File Coverage

blib/lib/ExtUtils/ModuleMaker.pm
Criterion Covered Total %
statement 189 194 97.4
branch 77 92 83.7
condition 6 6 100.0
subroutine 17 17 100.0
pod 6 6 100.0
total 295 315 93.6


line stmt bran cond sub pod time code
1             package ExtUtils::ModuleMaker;
2 18     18   39679 use strict;
  18         31  
  18         417  
3 18     18   65 use warnings;
  18         27  
  18         716  
4             our (@ISA);
5             our $VERSION = "0.63";
6 18         6805 use base qw(
7             ExtUtils::ModuleMaker::Defaults
8             ExtUtils::ModuleMaker::Initializers
9             ExtUtils::ModuleMaker::StandardText
10 18     18   75 );
  18         23  
11 18     18   89 use Carp;
  18         34  
  18         747  
12 18     18   80 use File::Path qw(mkpath);
  18         27  
  18         539  
13 18     18   72 use File::Spec;
  18         25  
  18         234  
14 18     18   64 use Cwd;
  18         26  
  18         826  
15 18     18   6664 use File::HomeDir 0.86;
  18         69790  
  18         32287  
16              
17             #################### PUBLICLY CALLABLE METHODS ####################
18              
19             sub new {
20 101     101 1 42399 my $class = shift;
21              
22 101 100       307 my $self = ref($class) ? bless( {}, ref($class) )
23             : bless( {}, $class );
24              
25             # multi-stage initialization of EU::MM object
26              
27             # 1. Pull in arguments supplied to constructor -- but don't do anything
28             # with them yet. These will come from one of three sources:
29             # a. In a script: KEY => 'Value' pairs supplied to new();
30             # b. From modulemaker command-line: -option 'Value' pairs following
31             # 'modulemaker';
32             # c. From modulemaker interactive mode: hard-wired values which may
33             # supersede (b) values.
34 101         367 my @arglist = @_;
35 101 100       630 croak "Must be hash or balanced list of key-value pairs: $!"
36             if (@arglist % 2);
37 99         337 my %supplied_params = @arglist;
38              
39             # 2. Determine if there already exists on system a directory capable of
40             # holding user ExtUtils::ModuleMaker::Personal::Defaults. The name of
41             # such a directory and whether it exists at THIS point are stored in an
42             # array, a reference to which is the return value of
43             # _preexists_mmkr_directory and which is then stored in the object.
44             # NOTE: If the directory does not yet exists, it is NOT automatically
45             # created.
46 99 100       241 if ($supplied_params{debug}) {
47 2         39 print "AAA: \@INC: @INC\n";
48 2         31 print "AAA: \@ISA: @ISA\n";
49             }
50 99         264 $self->{mmkr_dir_ref} = _get_subhome_directory_status(".modulemaker");
51 99 100       274 if ($supplied_params{debug}) {
52 2         4 for my $k (sort keys %{$self->{mmkr_dir_ref}}) {
  2         18  
53 8         70 printf(" %-12s%s\n" => $k, $self->{mmkr_dir_ref}->{$k});
54             }
55             }
56             {
57 99         157 my $mmkr_dir = $self->{mmkr_dir_ref}->{abs};
  99         200  
58 99 50       201 if (defined $self->{mmkr_dir_ref}->{flag}) {
59 99 100       210 print "BBB: mmkr_dir_ref flag: $self->{mmkr_dir_ref}->{flag}\n" if $supplied_params{debug};
60 99 100       258 push @INC, $mmkr_dir unless $INC[-1] eq $mmkr_dir;
61             }
62             else {
63 0 0       0 print "BBB: mmkr_dir_ref flag not found\n" if $supplied_params{debug};
64             }
65 99         792 my $pers_file = File::Spec->catfile( $mmkr_dir,
66             qw| ExtUtils ModuleMaker Personal Defaults.pm |
67             );
68 99 100       1051 if (-f $pers_file) {
69 9 100       56 print "CCC: Personal::Defaults module '$pers_file' found\n" if $supplied_params{debug};
70 9         2264 require ExtUtils::ModuleMaker::Personal::Defaults;
71 9 100       190 unshift @ISA, qw(ExtUtils::ModuleMaker::Personal::Defaults)
72             unless $ISA[0] eq 'ExtUtils::ModuleMaker::Personal::Defaults';
73             }
74             else {
75 90 100       289 print "CCC: No Personal::Defaults module\n" if $supplied_params{debug};
76             }
77             }
78              
79 99 100       206 print "DDD: \@ISA: @ISA\n" if $supplied_params{debug};
80             # 3. Populate object with default values. These values will come from
81             # lib/ExtUtils/ModuleMaker/Defaults.pm, unless a Personal::Defaults file
82             # has been located in step 1 above.
83 99         149 my $defaults_ref;
84 99         493 $defaults_ref = $self->default_values();
85 99 100       236 print "EEE: AUTHOR: $defaults_ref->{AUTHOR}\n" if $supplied_params{debug};
86 99         157 foreach my $param ( keys %{$defaults_ref} ) {
  99         469  
87 3257         4178 $self->{$param} = $defaults_ref->{$param};
88             }
89 99 100       317 print "FFF: AUTHOR: $self->{AUTHOR}\n" if $supplied_params{debug};
90              
91              
92             # 4. Process key-value pairs supplied as arguments to new() either
93             # from user-written program or from modulemaker utility.
94             # These override default values (or may provide additional elements).
95 99         228 foreach my $param ( keys %supplied_params ) {
96 383         492 $self->{$param} = $supplied_params{$param};
97             }
98              
99             # 5. Initialize keys set from information supplied above, system
100             # info or EU::MM itself.
101 99         463 $self->set_author_composite();
102 99         321 $self->set_dates();
103 99         206 $self->{eumm_version} = $VERSION;
104 99         251 $self->{MANIFEST} = ['MANIFEST'];
105              
106             # 6. Validate values supplied so far to weed out most likely errors
107 99         353 $self->validate_values();
108              
109             # 7. Initialize $self->{FILE} (done here because it presumes a validated
110             # NAME, which was only done in step 6). But allow exception for
111             # Interactive mode because it throws a spurious warning.
112 90 50       402 $self->set_file_composite() unless $self->{INTERACTIVE};
113              
114             # 8. Initialize keys set from EU::MM::Licenses::Local or
115             # EU::MM::Licenses::Standard
116 90         321 $self->initialize_license();
117              
118             # 9. Any EU::MM methods stored in ExtUtils::ModuleMaker::Standard Text
119             # can be overriden by supplying a
120             # value for ALT_BUILD (command-line option 'd') where the value is a Perl
121             # module located in @INC
122 90 100       204 if (defined $self->{ALT_BUILD}) {
123 1         2 my $alt_build = $self->{ALT_BUILD};
124 1 50       15 unless ($alt_build =~ m{^ExtUtils::ModuleMaker::}) {
125 0         0 $alt_build = q{ExtUtils::ModuleMaker::} . $alt_build;
126             }
127 1         87 eval "require $alt_build";
128 1 50       4 if ($@) {
129 0         0 croak "Unable to locate $alt_build for alternative methods: $!";
130             } else {
131 1         47 unshift @ISA, $alt_build;
132             };
133             }
134 90         740 return $self;
135             }
136              
137             sub complete_build {
138 82     82 1 13414 my $self = shift;
139              
140 82         355 $self->create_base_directory();
141              
142 82         424 $self->create_directory( map { File::Spec->catdir( $self->{Base_Dir}, $_ ) }
  164         1076  
143             qw{ lib t } ); # always on
144              
145 81         767 $self->create_directory( map { File::Spec->catdir( $self->{Base_Dir}, $_ ) }
146             qw{ scripts } )
147 82 100       645 if $self->{INCLUDE_SCRIPTS_DIRECTORY}; # default is on
148              
149 82         544 $self->print_file( 'README', $self->text_README() ); # always on
150              
151             $self->print_file( 'LICENSE', $self->{LicenseParts}{LICENSETEXT} )
152 82 100       541 if $self->{INCLUDE_LICENSE}; # default is on
153              
154             $self->print_file( 'Todo', $self->text_Todo() )
155 82 100       508 if $self->{INCLUDE_TODO}; # default is on
156              
157             $self->print_file( 'Changes', $self->text_Changes() )
158 82 100       543 unless ( $self->{CHANGES_IN_POD} ); # default is off
159              
160             $self->print_file( 'MANIFEST.SKIP',
161             $self->text_MANIFEST_SKIP() )
162 82 100       295 if $self->{INCLUDE_MANIFEST_SKIP}; # default is off
163              
164             $self->print_file( qq|t/pod-coverage.t|, $self->text_pod_coverage_test() )
165 82 100       171 if $self->{INCLUDE_POD_COVERAGE_TEST}; # default is off
166              
167             $self->print_file( qq|t/pod.t|, $self->text_pod_test() )
168 82 100       149 if $self->{INCLUDE_POD_TEST}; # default is off
169              
170 82 100       219 if ( $self->{BUILD_SYSTEM} eq 'ExtUtils::MakeMaker' ) {
171 79         352 $self->print_file( 'Makefile.PL', $self->text_Makefile() );
172             }
173             else {
174 3         20 $self->print_file( 'Build.PL', $self->text_Buildfile() );
175 3 100 100     23 if ( $self->{BUILD_SYSTEM} eq 'Module::Build and proxy Makefile.PL'
176             or $self->{BUILD_SYSTEM} eq 'Module::Build and Proxy') {
177 2         9 $self->print_file( 'Makefile.PL',
178             $self->text_proxy_makefile() );
179             }
180             }
181              
182 82         268 my @pmfiles = ( $self );
183 82         99 foreach my $f ( @{ $self->{EXTRA_MODULES} } ) {
  82         281  
184 15         22 push @pmfiles, $f;
185             }
186 82         152 foreach my $module ( @pmfiles ) {
187 97         226 my ($dir, $file) = _get_dir_and_file($module);
188 97         379 $self->create_directory( join( '/', $self->{Base_Dir}, $dir ) );
189 97         694 my $text_of_pm_file = $self->text_pm_file($module);
190 97         294 $self->print_file( join( '/', $dir, $file ), $text_of_pm_file );
191             }
192              
193             # How test files are created depends on how tests for EXTRA_MODULES
194             # are handled: 1 test file per extra module (default) or all tests for all
195             # modules in a single file (example: PBP).
196 82 100       326 unless ($self->{EXTRA_MODULES_SINGLE_TEST_FILE}) {
197 80         135 my $ct = $self->{FIRST_TEST_NUMBER};
198 80         136 foreach my $module ( @pmfiles ) {
199 89         132 my ($teststart, $testmiddle);
200              
201             # Are we going to derive the lexical part of the test name from
202             # the name of the module it is testing? (non-default)
203             # Or are we simply going to use our pre-defined test name?
204             # (default)
205 89 100       184 if ($self->{TEST_NAME_DERIVED_FROM_MODULE_NAME}) {
206 4         12 $testmiddle = $self->process_attribute( $module, 'NAME' );
207 4         30 $testmiddle =~ s|::|$self->{TEST_NAME_SEPARATOR}|g;
208             } else {
209 85         139 $testmiddle = $self->{TEST_NAME};
210             }
211             #
212             # Are we going to include a number at start of test name?
213             # (default) If so, what is sprintf format and what character is
214             # used to separate it from the lexical part of the test name?
215 89         115 my $testfilename;
216 89 100       173 if (defined $self->{TEST_NUMBER_FORMAT}) {
217             $teststart = "t/" . $self->{TEST_NUMBER_FORMAT} .
218 85         176 $self->{TEST_NAME_SEPARATOR};
219 85         328 $testfilename = sprintf( $teststart . $testmiddle . q{.t}, $ct );
220             } else {
221 4         5 $teststart = "t/";
222 4         6 $testfilename = $teststart . $testmiddle . q{.t};
223             }
224              
225 89         319 $self->print_file( $testfilename,
226             $self->text_test( $testfilename, $module ) );
227 89         300 $ct++;
228             }
229             } else {
230 2         5 my ($teststart, $testfilename);
231 2 100       6 if (defined $self->{TEST_NUMBER_FORMAT}) {
232             $teststart = "t/" . $self->{TEST_NUMBER_FORMAT} .
233 1         3 $self->{TEST_NAME_SEPARATOR};
234             $testfilename = sprintf( $teststart . $self->{TEST_NAME} . q{.t},
235 1         4 $self->{FIRST_TEST_NUMBER});
236             } else {
237 1         3 $teststart = "t/";
238 1         3 $testfilename = $teststart . $self->{TEST_NAME} . q{.t};
239             }
240 2         23 $self->print_file( $testfilename,
241             $self->text_test_multi( $testfilename, \@pmfiles ) );
242             }
243              
244 82         134 $self->print_file( 'MANIFEST', join( "\n", @{ $self->{MANIFEST} } ) );
  82         450  
245 82 100       297 $self->make_selections_defaults() if $self->{SAVE_AS_DEFAULTS};
246 82         349 return 1;
247             }
248              
249             sub dump_keys {
250 1     1 1 2 my $self = shift;
251 1         4 my %keys_to_be_shown = map {$_, 1} @_;
  2         5  
252 1         677 require Data::Dumper;
253 1         5341 my ($k, $v, %retry);
254 1         4 while ( ($k, $v) = each %{$self} ) {
  44         75  
255 43 100       63 $retry{$k} = $v if $keys_to_be_shown{$k};
256             }
257 1         7 my $d = Data::Dumper->new( [\%retry] );
258 1         20 return $d->Dump;
259             }
260              
261             sub dump_keys_except {
262 1     1 1 2 my $self = shift;
263 1         2 my %keys_not_shown = map {$_, 1} @_;
  2         11  
264 1         5 require Data::Dumper;
265 1         2 my ($k, $v, %retry);
266 1         2 while ( ($k, $v) = each %{$self} ) {
  44         66  
267 43 100       70 $retry{$k} = $v unless $keys_not_shown{$k};
268             }
269 1         4 my $d = Data::Dumper->new( [\%retry] );
270 1         18 return $d->Dump;
271             }
272              
273             sub get_license {
274 1     1 1 669 my $self = shift;
275             return (join ("\n\n",
276             "=====================================================================",
277             "=====================================================================",
278             $self->{LicenseParts}{LICENSETEXT},
279             "=====================================================================",
280             "=====================================================================",
281             $self->{LicenseParts}{COPYRIGHT},
282 1         7 "=====================================================================",
283             "=====================================================================",
284             ));
285             }
286              
287             sub make_selections_defaults {
288 3     3 1 7 my $self = shift;
289 3         4 my %selections = %{$self};
  3         65  
290 3         10 my @dv = keys %{ $self->default_values() };
  3         11  
291 3         18 my $topfile = <<'END_TOPFILE';
292             package ExtUtils::ModuleMaker::Personal::Defaults;
293             use strict;
294              
295             my %default_values = (
296             END_TOPFILE
297              
298 3         5 my @keys_needed;
299 3         10 for my $k (@dv) {
300 97 100 100     210 push @keys_needed, $k
301             unless (
302             $k eq 'ABSTRACT' or
303             $k eq 'SAVE_AS_DEFAULTS'
304             );
305             }
306              
307 3         5 my $kvpairs;
308 3         5 foreach my $k (@keys_needed) {
309             $kvpairs .=
310             (' ' x 8) .
311             (sprintf '%-16s', $k) .
312             '=> q{' .
313 91         159 $selections{$k} .
314             "},\n";
315             }
316             $kvpairs .=
317 3         6 (' ' x 8) .
318             (sprintf '%-16s', 'ABSTRACT') .
319             '=> q{Module abstract (<= 44 characters) goes here}' .
320             "\n";
321              
322 3         5 my $bottomfile = <<'END_BOTTOMFILE';
323             );
324              
325             sub default_values {
326             my $self = shift;
327             return { %default_values };
328             }
329              
330             1;
331              
332             END_BOTTOMFILE
333              
334 3         18 my $output = $topfile . $kvpairs . $bottomfile;
335              
336 3         8 my $mmkr_dir = _make_subhome_directory($self->{mmkr_dir_ref});
337 3         32 my $full_dir = File::Spec->catdir($mmkr_dir,
338             qw| ExtUtils ModuleMaker Personal |
339             );
340 3 100       33 if (! -d $full_dir) {
341 1 50       204 mkpath( $full_dir )
342             or croak "Unable to make directory for placement of personal defaults file: $!";
343             }
344 3         29 my $pers_full = File::Spec->catfile( $full_dir, q{Defaults.pm} );
345 3 100       35 if (-f $pers_full ) {
346 2         19 my $modtime = (stat($pers_full))[9];
347 2 50       182 rename $pers_full,
348             "$pers_full.$modtime"
349             or croak "Unable to rename $pers_full: $!";
350             }
351 3 50       143 open my $fh, '>', $pers_full
352             or croak "Unable to open $pers_full for writing: $!";
353 3 50       35 print $fh $output or croak "Unable to print $pers_full: $!";
354 3 50       86 close $fh or croak "Unable to close $pers_full after writing: $!";
355             }
356              
357             ## C<_get_dir_and_file()>
358             ##
359             ## This subroutine was originally in lib/ExtUtils/ModuleMaker/Utility.pm.
360             ## As other subroutines therein were superseded by calls to File::Save::Home
361             ## functions, they were no longer called in the .pm or .t files, hence, became
362             ## superfluous and uncovered by test suite. When _get_dir_and_file() became the
363             ## last called subroutine from Utility.pm, I decided it was simpler to pull it
364             ## into the current package.
365             ##
366             ## Usage : _get_dir_and_file($module) within complete_build()
367             ## Purpose : Get directory and name for .pm file being processed
368             ## Returns : 2-element list: First $dir; Second: $file
369             ## Argument : $module: pointer to the module being built
370             ## (as there can be more than one module built by EU::MM);
371             ## for the primary module it is a pointer to $self
372             ## Comment : Merely a utility subroutine to refactor code; not a method call.
373              
374             sub _get_dir_and_file {
375 97     97   137 my $module = shift;
376 97         336 my @layers = split( /::/, $module->{NAME} );
377 97         207 my $file = pop(@layers) . '.pm';
378 97         207 my $dir = join( '/', 'lib', @layers );
379 97         240 return ($dir, $file);
380             }
381              
382             sub _get_subhome_directory_status {
383 100     100   175 my $subdir = shift;
384 100         468 my $home = File::HomeDir->my_home;
385 100         535 my $dirname = File::Spec->catdir($home, $subdir);
386 100         441 my $subdir_top = (File::Spec->splitdir($subdir))[0];
387              
388 100 50       1337 if (-d $dirname) {
389             return {
390 100         843 home => $home,
391             top => $subdir_top,
392             abs => $dirname,
393             flag => 1,
394             };
395             } else {
396             return {
397 0         0 home => $home,
398             top => $subdir_top,
399             abs => $dirname,
400             flag => undef,
401             };
402             }
403             }
404              
405             sub _make_subhome_directory {
406 3     3   4 my $desired_dir_ref = shift;
407 3         6 my $dirname = $desired_dir_ref->{abs};
408 3 50       38 if (! -d $dirname) {
409 0 0       0 mkpath $dirname
410             or croak "Unable to create desired directory $dirname: $!";
411             }
412 3         46 return $dirname;
413             }
414              
415             1;
416              
417             #################### DOCUMENTATION ####################
418              
419             =head1 NAME
420              
421             ExtUtils::ModuleMaker - Better than h2xs for creating modules
422              
423             =head1 SYNOPSIS
424              
425             At the command prompt:
426              
427             % modulemaker
428              
429             Inside a Perl program:
430              
431             use ExtUtils::ModuleMaker;
432              
433             $mod = ExtUtils::ModuleMaker->new(
434             NAME => 'Sample::Module'
435             );
436              
437             $mod->complete_build();
438              
439             $mod->dump_keys(qw|
440             ... # key provided as argument to constructor
441             ... # same
442             |);
443              
444             $mod->dump_keys_except(qw|
445             ... # key provided as argument to constructor
446             ... # same
447             |);
448              
449             $license = $mod->get_license();
450              
451             $mod->make_selections_defaults();
452              
453             =head1 VERSION
454              
455             This document references version 0.63 of ExtUtils::ModuleMaker, released
456             to CPAN on July 31 2018.
457              
458             =head1 DESCRIPTION
459              
460             This module is a replacement for the most typical use of the F
461             utility bundled with all Perl distributions: the creation of the
462             directories and files required for a pure-Perl module to be installable with
463             F and distributable on the Comprehensive Perl Archive Network (CPAN).
464              
465             F has many options which are useful -- indeed, necessary -- for
466             the creation of a properly structured distribution that includes C code
467             as well as Perl code. Most of the time, however, F is used as follows
468              
469             % h2xs -AXn My::Module
470              
471             to create a distribution containing only Perl code. ExtUtils::ModuleMaker is
472             intended to be an easy-to-use replacement for I use of F.
473              
474             While you can call ExtUtils::ModuleMaker from within a Perl script (as in
475             the SYNOPSIS above), it's easier to use with a command-prompt invocation
476             of the F script bundled with this distribution:
477              
478             % modulemaker
479              
480             Then respond to the prompts. For Perl programmers, laziness is a
481             virtue -- and F is far and away the laziest way to create a
482             pure Perl distribution which meets all the requirements for worldwide
483             distribution via CPAN.
484              
485             =head1 USAGE
486              
487             =head2 Usage from the command-line with F
488              
489             The easiest way to use ExtUtils::ModuleMaker is to invoke the
490             F script from the command-line. You can control the content of
491             the files built by F either by supplying command-line options or
492             -- easier still -- replying to the screen prompts in F's
493             interactive mode.
494              
495             B
496             turn now to the documentation for F which is bundled this
497             distribution.> Return to this document once you have become familiar with
498             F.
499              
500             =head2 Use of Public Methods within a Perl Program
501              
502             You can use ExtUtils::ModuleMaker within a Perl script to generate the
503             directories and files needed to begin work on a CPAN-ready Perl distribution.
504             You will need to call C and C, both of which are
505             described in the next section. These two methods control the
506             building of the file and directory structure for a new Perl distribution.
507              
508             There are four other publicly available methods in this version of
509             ExtUtils::ModuleMaker. C, C and C
510             are intended primarily as shortcuts for trouble-shooting problems with an
511             ExtUtils::ModuleMaker object. C enables you to be
512             even lazier in your use of ExtUtils::ModuleMaker by saving keystrokes entered
513             for attributes.
514              
515             =head3 C
516              
517             Creates and returns an ExtUtils::ModuleMaker object. Takes a list containing
518             key-value pairs with information specifying the structure and content of the
519             new module(s). (In this documentation, we will sometimes refer to these
520             key-value pairs as the I of the ExtUtils::ModuleMaker object.)
521             With the exception of key C (see below), the values in these
522             pairs are all strings. Like most such lists of key-value pairs, this list is
523             probably best held in a hash. Keys which may be specified are:
524              
525             =over 4
526              
527             =item * Required Argument
528              
529             =over 4
530              
531             =item * NAME
532              
533             The B required feature. This is the name of the primary module
534             (with 'C<::>' separators if needed). Will no longer support the older,
535             Perl 4-style separator "C<'>" like the module F. There is no
536             current default for NAME; you must supply a name explicitly.
537              
538             =back
539              
540             =item * Other Important Arguments
541              
542             =over 4
543              
544             =item * ABSTRACT
545              
546             A short description of the module. CPAN likes to use this feature to describe
547             the module. If the abstract contains an apostrophe (C<'>), then the value
548             corresponding to key C in the list passed to the constructor must be
549             double-quoted; otherwise F gets messed up. Certain CPAN indexing
550             features still work better if the abstract is 44 or fewer characters in
551             length, but this does not appear to be as mandatory as in the past. (Defaults
552             to dummy copy.)
553              
554             =item * VERSION
555              
556             A string holding the version number. For alpha releases, include an
557             underscore to the right of the dot like C<0.31_21>. (Default is C<0.01>.)
558              
559             =item * LICENSE
560              
561             Which license to include in the Copyright section. You can choose one of
562             the standard licenses by including 'perl', 'gpl', 'artistic', and 18 others
563             approved by opensource.org. The default is to choose the 'perl' flavor
564             which is to share it "under the same terms as Perl itself."
565              
566             Other licenses can be added by individual module authors to
567             ExtUtils::ModuleMaker::Licenses::Local to keep your company lawyers happy.
568              
569             Some licenses include placeholders that will be replaced with AUTHOR
570             information.
571              
572             =item * BUILD_SYSTEM
573              
574             This can take one of three values:
575              
576             =over 4
577              
578             =item * C<'ExtUtils::MakeMaker'>
579              
580             The first generates a basic Makefile.PL file for your module.
581              
582             =item * C<'Module::Build'>
583              
584             The second creates a Build.PL file.
585              
586             =item * C<'Module::Build and Proxy'>
587              
588             The third creates a Build.PL along with a proxy Makefile.PL
589             script that attempts to install Module::Build if necessary, and then
590             runs the Build.PL script. This option is recommended if you want to
591             use Module::Build as your build system. See Module::Build::Compat for
592             more details.
593              
594             B To correct a discrepancy between the documentation and code in
595             earlier versions of ExtUtils::ModuleMaker, we now explicitly provide
596             this synonym for the third option:
597              
598             'Module::Build and proxy Makefile.PL'
599              
600             (Thanks to David A Golden for spotting this bug.)
601              
602             =back
603              
604             =item * COMPACT
605              
606             For a module named "Foo::Bar::Baz" creates a base directory named
607             "Foo-Bar-Baz" instead of Foo/Bar/Baz. (Default is off.)
608              
609             =item * VERBOSE
610              
611             Prints messages to STDOUT as it creates directories, writes files, etc. (Default
612             is off.)
613              
614             =item * PERMISSIONS
615              
616             Used to create new directories. (Default is 0755: group and world can not
617             write.)
618              
619             =item * USAGE_MESSAGE
620              
621             Message given when the module Cs. Scripts should set this to the same
622             string it would print if the user asked for help. (A reasonable default is
623             provided.)
624              
625             =item * NEED_POD
626              
627             Include POD section in F<*.pm> files created. (Default is on.)
628              
629             =item * NEED_NEW_METHOD
630              
631             Include a simple C method in the F<*.pm> files created. (Default is
632             on.)
633              
634             =item * CHANGES_IN_POD
635              
636             Omit a F file, but instead add a HISTORY section to the POD.
637             (Default is off).
638              
639             =item * INCLUDE_MANIFEST_SKIP
640              
641             Boolean value which, if true, includes a F file in the
642             distribution with reasonable default values facilitating use of the F
643             manifest> command during module development. (Thanks to David A Golden for
644             this feature. Default is off.)
645              
646             =item * INCLUDE_TODO
647              
648             Boolean value which, if true, includes a F file in the distribution in
649             which the module's author or maintainer can discuss future lines of
650             development. (Default is on.)
651              
652             =item * INCLUDE_LICENSE
653              
654             Boolean value which, if true, includes a F file in the distribution.
655             (Which LICENSE file is determined in the LICENSE option.) (Default is on.)
656              
657             =item * INCLUDE_SCRIPTS_DIRECTORY
658              
659             Boolean value which, if true, includes a F directory (at the same
660             level as F or F). (Default is on.)
661              
662             =item * INCLUDE_WARNINGS
663              
664             Boolean value which, if true, inserts C in all Perl modules
665             created by use of this module. (Default is off.)
666              
667             =item * INCLUDE_ID_LINE
668              
669             Boolean value which, if true, inserts C<#$Id$> in all Perl modules
670             created by use of this module for the purpose of inserting a Subversion file
671             'Id' string. (Default is off.)
672              
673             =back
674              
675             =item * Arguments Related to the Module's Author
676              
677             =over 4
678              
679             =item * AUTHOR
680              
681             Name of the author. If the author's name contains an apostrophe (C<'>),
682             then the corresponding value in the list passed to the constructor must
683             be double-quoted; otherwise F gets messed up.
684             (Defaults to dummy copy.)
685              
686             =item * EMAIL
687              
688             Email address of the author. If the author's e-mail address contains
689             an apostrophe (C<'>), then the corresponding value in the list passed
690             to the constructor must be double-quoted; otherwise
691             F gets messed up. (Defaults to dummy copy.)
692              
693             =item * CPANID
694              
695             The CPANID of the author. (Defaults to dummy copy. To suppress printing of
696             this line entirely, set C to a Perl-false value such as an empty
697             string.)
698              
699             =item * WEBSITE
700              
701             The personal or organizational website of the author. (Defaults to dummy
702             copy. To suppress printing of this line entirely, set C to a
703             Perl-false value such as an empty string.)
704              
705             =item * ORGANIZATION
706              
707             Company or group owning the module. (Defaults to dummy copy. To suppress
708             printing of this line entirely, set C to a Perl-false value such as an
709             empty string.)
710              
711             =back
712              
713             =item * Argument Related to Multiple Modules within a Distribution
714              
715             =over 4
716              
717             =item * EXTRA_MODULES
718              
719             A reference to an array of hashes, each of which contains values for
720             additional modules in the distribution.
721              
722             $mod = ExtUtils::ModuleMaker->new(
723             NAME => 'Alpha::Beta',
724             EXTRA_MODULES => [
725             { NAME => 'Alpha::Beta::Gamma' },
726             { NAME => 'Alpha::Beta::Delta' },
727             { NAME => 'Alpha::Beta::Gamma::Epsilon' },
728             ],
729             );
730              
731             As with the primary module, the only attribute required for each extra
732             module is C. Other attributes may be supplied but the primary
733             module's values will be used if no value is given here.
734              
735             Each extra module will be created in the correct relative place in the
736             F directory. By default, a test file will also be created in the F
737             directory corresponding to each extra module to test that it loads
738             properly. (See EXTRA_MODULES_SINGLE_TEST_FILE below to learn how to change
739             this behavior.) However, no other supporting documents (I README,
740             Changes) will be created.
741              
742             This is one major improvement over the earlier F as you can now
743             build multi-module packages.
744              
745             =back
746              
747             =item * Arguments Related to Test Files
748              
749             =over 4
750              
751             =item * FIRST_TEST_NUMBER
752              
753             A non-negative natural number from which the count begins in test files that
754             are numerically ordered. (Default is C<1>.)
755              
756             =item * TEST_NUMBER_FORMAT
757              
758             In test files that are numerically ordered, a Perl C formatting
759             string that specifies how FIRST_TEST_NUMBER is to be formatted. (Default is
760             C<"%03d">.)
761              
762             =item * TEST_NAME
763              
764             String forming the core of the name of a test file. (Default is C).
765              
766             =item * TEST_NAME_DERIVED_FROM_MODULE_NAME
767              
768             Boolean value which, when true, tells ExtUtils::ModuleMaker to create a file
769             in the test suite with a name derived from the F<.pm> package it is testing,
770             thereby overriding any value set in the TEST_NAME attribute. For example, for
771             a module called 'Alpha::Sigma::Tau', a test file named F
772             will be created. (Default is off.)
773              
774             =item * TEST_NAME_SEPARATOR
775              
776             String holding the character which joins components of a test file's name,
777             I the character used to join C<001> and in a file named
778             F<001_load.t>. (Defaults to an underscore C<_>.)
779              
780             =item * EXTRA_MODULES_SINGLE_TEST_FILE
781              
782             Boolean value which, when true and when extra modules have been specified in
783             the EXTRA_MODULES attribute, will put tests for those extra modules in a
784             single test file rather than in individual test files corresponding to each
785             module. (Default is off.)
786              
787             =item * INCLUDE_POD_COVERAGE_TEST
788              
789             Boolean value which, if true, causes a test file called F
790             to be included in the F directory. This test is advocated by some Perl
791             quality assurance experts and module authors. However, since the maintainer
792             of ExtUtils::ModuleMaker is not persuaded of its worth, default is off.
793              
794             =item * INCLUDE_POD_TEST
795              
796             Boolean value which, if true, causes a test file called F
797             to be included in the F directory. This test is advocated by some Perl
798             quality assurance experts and module authors. However, since the maintainer
799             of ExtUtils::ModuleMaker is not persuaded of its worth, default is off.
800              
801             =item * INCLUDE_FILE_IN_PM
802              
803             String holding a path to a file containing Perl code and/or documentation
804             which will be included in each F file created in a particular
805             distribution. By default, such content is placed after any constructor and
806             before the main POD block. This could, for example, be used to insert stub
807             subroutines in each package within a distribution. Default is off.
808              
809             =back
810              
811             =item * Arguments for Advanced Usages
812              
813             =over 4
814              
815             =item * INTERACTIVE
816              
817             Activates interactive mode in F utility. The interactive mode
818             presents the user with a series of menus from which the user selects features
819             by entering text at the command prompt. This attribute should only be used
820             by interactive scripts like F. (Default is off.)
821              
822             =item * ALT_BUILD
823              
824             Name of a Perl package holding methods which override those called withiin
825             C to shape the content of files created by using
826             ExtUtils::ModuleMaker. See "An Alternative Approach to Subclassing" below.
827              
828             =back
829              
830             =back
831              
832             =head3 C
833              
834             Creates all directories and files as configured by the key-value pairs
835             passed to C. Returns a
836             true value if all specified files are created -- but this says nothing
837             about whether those files have been created with the correct content.
838              
839             =head3 C
840              
841             When troubleshooting problems with an ExtUtils::ModuleMaker object, it
842             is often useful to use F to dump the contents of the
843             object. Use C when you only need to examine a few of the
844             object's attributes.
845              
846             $mod->dump_keys( qw| NAME ABSTRACT | );
847              
848             =head3 C
849              
850             When troubleshooting problems with an ExtUtils::ModuleMaker object, it
851             is often useful to use F to dump the contents of the
852             object. However, since certain elements of that object are often quite
853             lengthy (I the values of keys C and
854             C), it's handy to have a dumper function that dumps all
855             keys I certain designated keys.
856              
857             $mod->dump_keys_except(qw| LicenseParts USAGE_MESSAGE |);
858              
859             =head3 C
860              
861             Returns a string which nicely formats a short version of the License
862             and Copyright information.
863              
864             $license = $mod->get_license();
865             print $license;
866              
867             ... will print something like this:
868              
869             =====================================================================
870             =====================================================================
871             [License Information]
872             =====================================================================
873             =====================================================================
874             [Copyright Information]
875             =====================================================================
876             =====================================================================
877              
878             (Earlier versions of ExtUtils::ModuleMaker contained a
879             C function in each of submodules
880             F and
881             F. These functions were never
882             publicly documented or tested. C is intended as a
883             replacement for those two functions.)
884              
885             =head3 C
886              
887             Saves the values you entered as arguments passed to C in a personal
888             defaults file so that they supersede the defaults provided by
889             ExtUtils::ModuleMaker itself.
890              
891             This is an advanced usage of ExtUtils::ModuleMaker.
892             If you have used ExtUtils::ModuleMaker more than once, you have probably typed
893             in a choice for C, C, etc., more than once. To save
894             unnecessary typing and reduce typing errors, ExtUtils::ModuleMaker now offers
895             you the possibility of establishing B which override
896             the default values supplied with the distribution and found in
897             F.
898              
899             Suppose that you have called C as follows:
900              
901             $mod = ExtUtils::ModuleMaker->new(
902             NAME => 'Sample::Module',
903             ABSTRACT => 'Now is the time to join the party',
904             AUTHOR => 'Hilton Stallone',
905             CPANID => 'RAMBO',
906             ORGANIZATION => 'Parliamentary Pictures',
907             WEBSITE => 'http://parliamentarypictures.com',
908             EMAIL => 'hiltons@parliamentarypictures.com',
909             );
910              
911             While C<$mod> is still in scope, you can call:
912              
913             $mod->make_selections_defaults()
914              
915             and the values selected -- B
916             -- will be saved in a F file stored in your home
917             directory. The next time you invoke ExtUtils::ModuleMaker, the new
918             values will appear in the appropriate locations in the files created
919             by C. They will also appear in the menus provided on screen
920             by the F utility.
921              
922             What are those two important exceptions?
923              
924             =over 4
925              
926             =item * C
927              
928             You cannot enter a default value for C: the name of the module
929             you are creating. ExtUtil::ModuleMaker's own defaults file omits a value for
930             C to prevent you from overwriting an already existing module. (More
931             precisely, the default value is an empty string. ExtUtil::ModuleMaker will
932             throw an error if you attempt to create a module whose name is empty.) This
933             precaution applies to your personal defaults file as well.
934              
935             =item * C
936              
937             Since every module you create presumably has its own unique purpose, every
938             module must have a unique C to summarize that purpose.
939             ExtUtil::ModuleMaker supplies the following string as the default value for
940             the C key:
941              
942             Module abstract (<= 44 characters) goes here
943              
944             ... a string which, not coincidentally, happens to be exactly 44 characters
945             long -- so you can just overstrike it. This will be the default value for
946             C in any F file you create as well.
947              
948             =back
949              
950             =head1 CUSTOMIZATION
951              
952             ExtUtils::ModuleMaker is designed to be customizable to your needs and to
953             offer you more flexibility as you become more experienced with it.
954              
955             =head2 Via F Utility Interactive Mode
956              
957             As with everything else about ExtUtils::ModuleMaker, the easiest,
958             laziest way to get started is via the F utility; see
959             its documentation. Suppose that you have entered your correct name,
960             email address and website at the prompts in F's Author Menu.
961              
962             ------------------------
963              
964             modulemaker: Author Menu
965              
966             Feature Current Value
967             N - Author 'John Q Public'
968             C - CPAN ID 'MODAUTHOR'
969             O - Organization 'XYZ Corp.'
970             W - Website 'http://public.net/~jqpublic'
971             E - Email 'jqpublic@public.net'
972              
973             R - Return to main menu
974             X - Exit immediately
975              
976             Please choose which feature you would like to edit:
977              
978             Why should you ever have to enter this information again? Return
979             to the F Main Menu (C).
980              
981             ------------------------
982              
983             modulemaker: Main Menu
984              
985             Feature Current Value
986             N - Name of module ''
987             S - Abstract 'Module abstract (<= 44 characters) goes here'
988             A - Author information
989             L - License 'perl'
990             D - Directives
991             B - Build system 'ExtUtils::MakeMaker'
992              
993             G - Generate module
994             H - Generate module;
995             save selections as defaults
996              
997             X - Exit immediately
998              
999             Please choose which feature you would like to edit:
1000              
1001             Select C instead of C to generate the distribution. An internal
1002             call to C will save those selections in a
1003             personal defaults file and present them to you on the Author Menu the
1004             next time you go to use it.
1005              
1006             =head2 Via F Utility Command-Line Options Mode
1007              
1008             For simplicity, not all of ExtUtils::ModuleMaker's default values are
1009             represented on F's menus. Those that are not represented on
1010             those menus cannot be changed from there. They I, however, in many
1011             cases be specified as options passed to F on the command-line and
1012             automatically saved as personal defaults by including the C flag as one of
1013             those options. If, for example, your name is 'John Q Public' and you want all
1014             modules you create to have compact top-level directories, you would call:
1015              
1016             % modulemaker -Icsn Sample::Module -u 'John Q Public'
1017              
1018             A distribution with a top-level directory F would be created.
1019             'John Q Public' would appear in appropriate places in
1020             F and F. You
1021             could then throw away the entire F directory tree. The I
1022             time you call C, the call
1023              
1024             % modulemaker -In Second::Module
1025              
1026             would suffice to generate a compact top-level directory and 'John Q Public'
1027             would appear in appropriate locations instead of the dreaded 'A. U. Thor'.
1028              
1029             =head2 Via C
1030              
1031             In I cases, ExtUtils::ModuleMaker's default values can be overridden with
1032             arguments passed to C inside a Perl program. The overriding can then
1033             be made permanent by calling C.
1034              
1035             Suppose, for example,
1036              
1037             =over 4
1038              
1039             =item 1
1040              
1041             that you want the files in your test suite to appear in a numerical order
1042             starting from C<0> rather than ExtUtils::ModuleMaker's own default starting
1043             point of C<1>;
1044              
1045             =item 2
1046              
1047             that you want the number in the test file's name to be formatted as a
1048             two-digit string padded with zeroes rather than ExtUtils::ModuleMaker's own
1049             default format of a three-digit, zero-padded string;
1050              
1051             =item 3
1052              
1053             that you want the numerical part of the test filename to be joined to the
1054             lexical part with a dot (C<.>) rather than ExtUtils::ModuleMaker's own default
1055             linkage character of an underscore (C<_>); and
1056              
1057             =item 4
1058              
1059             that you want the lexical part of the test filename to reflect the module's
1060             name rather than ExtUtils::ModuleMaker's default of C.
1061              
1062             =back
1063              
1064             Your Perl program would look like this:
1065              
1066             #!/usr/local/bin/perl
1067             use strict;
1068             use warnings;
1069             use ExtUtils::ModuleMaker;
1070              
1071             my $mod = ExtUtils::ModuleMaker->new(
1072             NAME => 'Sample::Module',
1073             AUTHOR => 'John Q Public',
1074             COMPACT => 1,
1075             FIRST_TEST_NUMBER => 0,
1076             TEST_NUMBER_FORMAT => "%02d",
1077             TEST_NAME_SEPARATOR => q{.},
1078             TEST_NAME_DERIVED_FROM_MODULE_NAME => 1,
1079             );
1080              
1081             $mod->make_selections_defaults();
1082              
1083             A subsequent call to the F utility,
1084              
1085             % modulemaker -In Second::Balcony::Jump
1086              
1087             would generate a directory tree with a compact top-level, 'John Q Public' in
1088             appropriate locations in F and
1089             F and a test file called
1090             F.
1091              
1092             =head2 Via Subclassing ExtUtils::ModuleMaker
1093              
1094             If you're a power-user, once you start playing with ExtUtils::ModuleMaker, you
1095             won't be able to stop. You'll ask yourself, "Self, if I can change the
1096             default values, why can't I change the 'boilerplate' copy that appears inside
1097             the files which ExtUtils::ModuleMaker creates?"
1098              
1099             Now, you can. You can hack on the methods which
1100             C and C call internally to
1101             customize their results to your heart's desire. The key: build an entirely
1102             new Perl extension whose F file has methods that override the
1103             methods you need overridden -- and I those methods. Follow these steps:
1104              
1105             =head3 1. Study F, F<::Initializers> and F<::StandardText>
1106              
1107             ExtUtils::ModuleMaker's default values are stored in
1108             F, specifically, in its
1109             C method. Identify those values which you wish to change.
1110              
1111             ExtUtils::ModuleMaker's other internal methods are found in two other files:
1112             F and
1113             F. Rule of thumb: If an internal
1114             method is called within C, it is found in
1115             ExtUtils::ModuleMaker::Initializers. If it is called within
1116             C, it is found in ExtUtils::ModuleMaker::StandardText.
1117             Study these two packages to identify the methods you wish to override.
1118              
1119             I If changing a default value in ExtUtils::ModuleMaker::Defaults will
1120             achieve your objective, make that change rather than trying to override
1121             methods in ExtUtils::ModuleMaker::Initializers or
1122             ExtUtils::ModuleMaker::StandardText.
1123              
1124             I You should probably think about overriding methods in
1125             ExtUtils::ModuleMaker::StandardText before overriding those in
1126             ExtUtils::ModuleMaker::Initializers.
1127              
1128             =head3 2. Use F to Create the Framework for a New Distribution
1129              
1130             You're creating a new Perl extension. Who ya gonna call? F,
1131             natch! (If you have not read the documentation for F by this
1132             point, do so now.)
1133              
1134             Suppose that you've gotten on the 'Perl Best Practices' bandwagon and want to
1135             create all your Perl extensions in the style recommended by Damian Conway in
1136             the book of the same name. Use F to create the framework:
1137              
1138             % modulemaker -Icqn ExtUtils::ModuleMaker::PBP \
1139             -u 'James E Keenan' \
1140             -p JKEENAN \
1141             -o 'Perl Seminar NY' \
1142             -w http://search.cpan.org/~jkeenan/
1143              
1144             You used the C<-q> option above because you do I want or need a
1145             constructor in the new package you are creating. That package will I
1146             its constructor from ExtUtils::ModuleMaker.
1147              
1148             =head3 3. Edit the F File
1149              
1150             Open up the best text-editor at your disposal and proceed to hack:
1151              
1152             % vi ExtUtils-ModuleMaker-PBP/lib/ExtUtils/ModuleMaker/PBP.pm
1153              
1154             Add this line near the top of the file:
1155              
1156             use base qw{ ExtUtils::ModuleMaker };
1157              
1158             so that ExtUtils::ModuleMaker::PBP inherits from ExtUtils::ModuleMaker (which,
1159             in turn, inherits from ExtUtils::ModuleMaker::Defaults,
1160             ExtUtils::ModuleMaker::Initializers and ExtUtils::ModuleMaker::StandardText).
1161              
1162             If you have carefully studied ExtUtils::ModuleMaker::Defaults,
1163             ExtUtils::ModuleMaker::StandardText and I, you will write
1164             methods including the following:
1165              
1166             sub default_values {
1167             my $self = shift;
1168             my $defaults_ref = $self->SUPER::default_values();
1169             $defaults_ref->{COMPACT} = 1;
1170             $defaults_ref->{FIRST_TEST_NUMBER} = 0;
1171             $defaults_ref->{TEST_NUMBER_FORMAT} = "%02d";
1172             $defaults_ref->{EXTRA_MODULES_SINGLE_TEST_FILE} = 1;
1173             $defaults_ref->{TEST_NAME_SEPARATOR} = q{.};
1174             $defaults_ref->{INCLUDE_TODO} = 0;
1175             $defaults_ref->{INCLUDE_POD_COVERAGE_TEST} = 1;
1176             $defaults_ref->{INCLUDE_POD_TEST} = 1;
1177             return $defaults_ref;;
1178             }
1179              
1180             sub text_Makefile {
1181             my $self = shift;
1182             my $Makefile_format = q~
1183             use strict;
1184             use warnings;
1185             use ExtUtils::MakeMaker;
1186              
1187             WriteMakefile(
1188             NAME => '%s',
1189             AUTHOR => '%s <%s>',
1190             VERSION_FROM => '%s',
1191             ABSTRACT_FROM => '%s',
1192             PL_FILES => {},
1193             PREREQ_PM => {
1194             'Test::More' => 0,
1195             'version' => 0,
1196             },
1197             dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
1198             clean => { FILES => '%s-*' },
1199             );
1200             ~;
1201             my $text_of_Makefile = sprintf $Makefile_format,
1202             map { my $s = $_; $s =~ s{'}{\\'}g; $s; }
1203             $self->{NAME},
1204             $self->{AUTHOR},
1205             $self->{EMAIL},
1206             $self->{FILE},
1207             $self->{FILE},
1208             $self->{FILE};
1209             return $text_of_Makefile;
1210             }
1211              
1212             Of course, for true Perl laziness, you'll use CPAN distribution
1213             ExtUtils::ModuleMaker::PBP, written by the author of ExtUtils::ModuleMaker as
1214             an exemplar of subclassing ExtUtils::ModuleMaker and generating the same
1215             output as Damian Conway's Module::Starter::PBP.
1216              
1217             =head3 4. Test
1218              
1219             How do you know you have correctly subclassed ExtUtils::ModuleMaker? With a
1220             test suite, of course. With careful editing, you can use many of
1221             ExtUtils::ModuleMaker's own tests in your new distribution. You will, of
1222             course, have to change a number of tests, because the default values implied
1223             by Conway's recommendations are different from ExtUtils::ModuleMaker's own
1224             defaults. Among other things, you will have to do a search-and-replace on all
1225             constructor calls.
1226              
1227             % perl -pi'*.bak' -e 's{ExtUtils::ModuleMaker->new}{ExtUtils::ModuleMaker::PBP->new}g;'
1228              
1229             Of course, you I have written your tests first, right?
1230              
1231             =head3 5. Install and Use
1232              
1233             You would install your new distribution as you would any other Perl
1234             distribution, I with either ExtUtils::MakeMaker or Module::Build,
1235             depending on which you chose in creating your subclass.
1236              
1237             #!/usr/local/bin/perl
1238             use strict;
1239             use warnings;
1240             use ExtUtils::ModuleMaker::PBP;
1241              
1242             my $mod = ExtUtils::ModuleMaker::PBP->new(
1243             NAME => 'Sample::Module',
1244             );
1245              
1246             $mod->complete_build();
1247              
1248             For an adaptation of the F utility to work with
1249             ExtUtils::ModuleMaker::PBP, see F which is bundled with the latter
1250             package.
1251              
1252             =head3 An Alternative Approach to Subclassing
1253              
1254             There is one other way to subclass to ExtUtils::ModuleMaker which bears
1255             mentioning, more because the author used it in the development of this version
1256             of ExtUtils::ModuleMaker than because it is recommended. If for some reason
1257             you do not wish to create a full-fledged Perl distribution for your subclass,
1258             you can simply write the subclassing package and store it in the same
1259             directory hierarchy on your system in which your personal defaults file is
1260             stored.
1261              
1262             For example, suppose you are experimenting and only wish to override one
1263             method in ExtUtils::ModuleMaker::StandardText. You can create a package
1264             called ExtUtils::ModuleMaker::AlternativeText. If you are working on a
1265             Unix-like system, you would move that file such that its path would be:
1266              
1267             "$ENV{HOME}/.modulemaker/ExtUtils/ModuleMaker/AlternativeText.pm"
1268              
1269             You would then add one argument to your call to
1270             C:
1271              
1272             my $mod = ExtUtils::ModuleMaker->new(
1273             NAME => 'Sample::Module',
1274             ALT_BUILD => 'ExtUtils::ModuleMaker::AlternativeText',
1275             );
1276              
1277             =head1 CAVEATS
1278              
1279             =over 4
1280              
1281             =item * Require Perl 5.6.1
1282              
1283             Support for versions of Perl earlier than 5.6.1 was dropped in version 0.57
1284             released in May 2018.
1285              
1286             =item * Testing of F's Interactive Mode
1287              
1288             The easiest, laziest and recommended way of using this distribution is
1289             the command-line utility F, especially its interactive
1290             mode. However, this is necessarily the most difficult test, as its
1291             testing would require capturing the STDIN, STDOUT and STDERR for a
1292             process spawned by a C call from within a test
1293             file. For now, the maintainer has relied on repeated visual inspection
1294             of the screen prompts generated by F. With luck, F-based
1295             tests will be available in a future version.
1296              
1297             =item * Testing F on Non-*nix-Like Operating Systems
1298              
1299             Since testing the F utility from within the test suite
1300             requires a C call, a clean test run depends in part on the way
1301             a given operating system parses command-line arguments. The maintainer
1302             has tested this on Darwin and Win32 and, thanks to a suggestion by A.
1303             Sinan Unur, solved a problem on Win32. Results on other operating
1304             systems may differ; feedback is welcome.
1305              
1306             =back
1307              
1308             =head1 TO DO
1309              
1310             =over 4
1311              
1312             =item *
1313              
1314             Tests for F's interactive mode.
1315              
1316             =item *
1317              
1318             Possible new C attribute which would insert modules from which
1319             user's new module will inherit.
1320              
1321             USE_AS_BASE => [ qw|
1322             Template::Toolkit
1323             Module::Build
1324             Lingua::Romana::Perligata
1325             Acme::Buffy
1326             | ],
1327              
1328             Such an attribute would require replacement copy for
1329             C.
1330              
1331             =back
1332              
1333             =head1 AUTHOR/MAINTAINER
1334              
1335             ExtUtils::ModuleMaker was originally written in 2001-02 by R. Geoffrey Avery
1336             (modulemaker [at] PlatypiVentures [dot] com). Since version 0.33 (July
1337             2005) it has been maintained by James E. Keenan (jkeenan [at] cpan [dot]
1338             org).
1339              
1340             =head1 SUPPORT
1341              
1342             Send email to jkeenan [at] cpan [dot] org. Please include 'modulemaker'
1343             in the subject line. Please report any bugs or feature requests to
1344             C, or through the web interface at
1345             L.
1346              
1347             Development repository: L
1348              
1349             =head1 ACKNOWLEDGMENTS
1350              
1351             Thanks first and foremost to Geoff Avery for creating ExtUtils::ModuleMaker
1352             and popularizing it via presentations I attended at YAPC::NA::2003 (Boca
1353             Raton) and YAPC::EU::2003 (Paris).
1354              
1355             Soon after I took over maintenance of ExtUtils::ModuleMaker, David A
1356             Golden became a driving force in its ongoing development, providing
1357             suggestions for additional functionality as well as bug reports. David is the
1358             author of ExtUtils::ModuleMaker::TT which, while not a pure subclass of
1359             ExtUtils::ModuleMaker, extends its functionality for users of
1360             Template::Toolkit.
1361              
1362             Thanks for suggestions about testing the F utility to
1363             Michael G Schwern on perl.qa and A Sinan Unur and Paul Lalli on
1364             comp.lang.perl.misc. Thanks for help in dealing with a nasty bug in the
1365             testing to Perlmonks davidrw and tlm. That well known Perl hacker, Anonymous
1366             Guest, contributed another bug report on rt.cpan.org.
1367              
1368             As development proceeded, several issues were clarified by members of
1369             Perlmonks.org. CountZero, xdg, Tanktalus, holli, TheDamian and nothingmuch
1370             made particularly useful suggestions, as did Brian Clarkson.
1371              
1372             Thanks also go to the following beta testers: Alex Gill, Marc Prewitt, Scott
1373             Godin, Reinhard Urban and imacat.
1374              
1375             Version 0.39 of ExtUtils::ModuleMaker encountered spurious testing failure reports
1376             from testers.cpan.org. These were eventually diagnosed as being due to bugs
1377             in the automated testing programs and/or their operating environments on
1378             different systems -- I to problems outside ExtUtils::ModuleMaker
1379             itself. Several Perlmonks helped investigate this problem: chromatic,
1380             dave_the_m, randyk, and njh.
1381              
1382             Thanks to Paul M Sirianni for reporting bugs that led to versions 0.48 and
1383             0.51.
1384              
1385             Thanks to Chris Kirke for pointing to reports at
1386             http://cpants.cpanauthors.org/dist/ExtUtils-ModuleMaker of inconsistent
1387             $VERSION numbers across the component files.
1388              
1389             =head1 COPYRIGHT
1390              
1391             Copyright (c) 2001-2002 R. Geoffrey Avery.
1392             Revisions from v0.33 forward (c) 2005-2015 James E. Keenan.
1393             All rights reserved.
1394             This program is free software; you can redistribute
1395             it and/or modify it under the same terms as Perl itself.
1396              
1397             The full text of the license can be found in the
1398             LICENSE file included with this module.
1399              
1400             =head1 DISCLAIMER OF WARRANTY
1401              
1402             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1403             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
1404             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1405             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
1406             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1407             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
1408             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
1409             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
1410             NECESSARY SERVICING, REPAIR, OR CORRECTION.
1411              
1412             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1413             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1414             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
1415             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
1416             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
1417             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
1418             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
1419             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
1420             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
1421             SUCH DAMAGES.
1422              
1423             =head1 SEE ALSO
1424              
1425             F, F, F, F, F,
1426             F, F, F.
1427              
1428             =cut
1429