Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I use PodWeaver in dist.ini with default settings (no weaver.ini). The resulting POD always has duplicate "=head1 NAME" sections. Any idea on which dzil/podweaver plugins added them? Running "dzil build --verbose" still doesn't give me enough details.

  • Comment on [dzil/podweaver] who added =head1 NAME?

Replies are listed 'Best First'.
Re: [dzil/podweaver] who added =head1 NAME?
by kentnl (Initiate) on Feb 10, 2011 at 10:50 UTC

    The most obvious cause is thus.

    1. You have an # ABSTRACT line in your files.
    2. You have an =head1 NAME field you added yourself.
    3. Your POD::Weaver configuration includes this plugin: Section::Name

    The advised solution is to remove your manually added =head1 NAME.

Re: [dzil/podweaver] who added =head1 NAME?
by Corion (Patriarch) on Feb 10, 2011 at 08:24 UTC

    Maybe you can list your plugins and show us your configuration? As far as I'm aware, Dist::Zilla is full of magic, but parts of that magic are influenced by magic plugins, while other parts are influenced by magic configuration file entries.

    You can note from my abundant use of the word "magic" that I'm no fan of Dist::Zilla and have little factual knowledge about it, other than the ability to grep through its source code.

      "Well, sir, I don't know much about it, but I know I don't like it."
      rjbs

        So?

        What I've seen of it is enough to make me wary of its features, especially when the magic smoke blows in a direction I don't like. That doesn't mean I won't give it a try - I also gave Module::Build a try when it seemed to be of use. But I don't need to master Dist::Zilla to know what parts of it make my magic-sense tingle.

Re: [dzil/podweaver] who added =head1 NAME?
by Khen1950fx (Canon) on Feb 10, 2011 at 09:22 UTC
    You didn't give much information, but I'd be willing to bet that you're missing some prerequisites, and your config might need some tweaking.

    First, what happened to the weaver.ini? You need a weaver.ini and a dist.ini. See: Of Modernizing My Own Modules by NPEREZ. He gives the urls for templates for dist.ini and weaver.ini. PodWeaver should be as easy as this in your dist.ini:

    dist.ini

    1: [PodWeaver]
    Or this in your weaver.ini:

    weaver.ini

    1: [@DEFAULT] 2: 3: [-Transformer] 4: transformer = List
    Second, before you can get there, run these bundles to make sure that you have all the modules that you'll need for setup.

    ForMoose:

    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "namespace::clean", "namespace::autoclean", "Class::MOP", "Eval::Closure", "Package::DeprecationManager", "Sub::Name", "Test::Fatal", "Dist::CheckConflicts", "Data::OptList", "Devel::GlobalDestruction", "List::MoreUtils", "MRO::Compat", "Params::Util", "Scalar::Util", "Sub::Exporter", "Task::Weaken", "Moose", "MooseX::Role::WithOverloading", "Moose::Autobox", "Package::Stash::XS", "Package::Stash");
    For dzil
    #!usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "App::Cmd::Setup", "CPAN::Meta::Converter", "CPAN::Meta::Prereqs", "CPAN::Meta::Validator", "CPAN::Uploader", "Config::MVP::Reader", "Config::MVP::Reader::Findable::ByExtension", "Config::MVP::Reader::INI", "List::MoreUtils", "Log::Dispatchouli", "Perl::PrereqScanner", "Pod::Eventual", "String::Formatter", "Version::Requirements", "Sub::Exporter::ForMethods", "Pod::Elemental", "Pod::Elemental::PerlMunger", "Pod::Weaver", "PPI");
    For Dist::Zilla and plugins:

    Task::Dist::Zilla