Better yet, if you want to write more than about 2 modules, just write your own. h2xs adds more useless junk with every Perl release, and Module::Starter seems no better. When you write your own, you type in all and only the boilerplate you want when you write it, and you don't have extraneous garbage inserted when you create future modules. Here's what I use:
#!/usr/bin/env perl use Getopt::Long; $ME = q|WHATEVER|; sub usage { print STDERR <<'EOS'; Usage: newmod.pl [-u 'Name <user@host>'] Module::Name EOS exit 1; } GetOptions('user:s' => \$ME) && @ARGV == 1 or usage; $mod = shift; ($dir = $mod) =~ s/::/-/g; mkdir $dir or die $!; chdir $dir; sub cat { my $o = shift; open OUT, ">$o" or die $!; print OUT $_ for @_; close OUT; } ($file = $mod) =~ s/.*:://; cat 'Makefile.PL', <<EOS; use ExtUtils::MakeMaker; WriteMakefile( NAME => '$mod', VERSION_FROM => '$file.pm', PREREQ_PM => { }, (\$] >= 5.005 ? ## Add these new keywords supported since 5.00 +5 (AUTHOR => q|$ME|) : ()), ABSTRACT => 'Something.', ); EOS cat "$file.pm", <<EOS; package $mod; =head1 NAME $mod -- Whatever it does... =head1 SYNOPSIS =cut \$VERSION = '0.01'; 1; __END__ =head1 DESCRIPTION =head1 AUTHOR ${ME} Bug reports welcome, patches even more welcome. =head1 COPYRIGHT Copyright (C) $y $ME. All rights reserved, some wrongs reversed. This module is distributed under the same terms as Perl itself. =cut EOS cat "test.pl", <<EOS; use Test::Simple tests => 1; use $mod; ok(1, 'loaded'); EOS (undef, undef, undef, $d, $m, $y) = localtime; $y += 1900; cat "ChangeLog", <<EOS; $y-$m-$d $ME * original version; created by newmod.pl EOS cat "README", <<EOS; $mod version 0.01 INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install DEPENDENCIES COPYRIGHT AND LICENSE Copyright (C) $y, $ME This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. EOS cat 'MANIFEST', <<EOS; Makefile.PL MANIFEST README test.pl $file.pm EOS

In reply to Re^2: Write a Perl module from scratch by educated_foo
in thread Write a Perl module from scratch by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.