On Sun Nov 06 08:39:43 2005, JKEENAN wrote:
Show quoted text> The documentation for ExtUtils::ModuleMaker.pm (section USAGE;
> subsection "Use of Public Methods within a Perl Program/new/Arguments
> Related to the Module's Author") asserts that if the user elects *not*
> to provide values for attributes CPANID, WEBSITE and ORGANIZATION,
> "...then the line will not be added to the documentation." Visual
> inspection of lib/*.pm files created with modulemaker reveals that, in
> those circumstances, a line *is* added to the documentation, albeit an
> all-whitespace line. This should be fixed so that the author data
> contains no visually blank lines.
Case 1: Each of CPANID, WEBSITE and ORGANIZATION is explicitly set to a Perl-false value.
[modulemaker] 540 $ grep -A10 -E '^\$mod\s' rt-15563.pl
$mod = ExtUtils::ModuleMaker->new(
NAME => $module_name,
COMPACT => 1,
CPANID => 0,
WEBSITE => 0,
ORGANIZATION => 0,
);
$mod->complete_build();
[modulemaker] 541 $ perl rt-15563.pl
[modulemaker] 542 $ grep -A8 AUTHOR Foo-Bar/lib/Foo/Bar.pm
=head1 AUTHOR
A. U. Thor
a.u.thor@a.galaxy.far.far.away
=head1 COPYRIGHT
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
#####
Result: CPANID, WEBSITE and ORGANIZATION are omitted, as intended, with no extra whitespace.
###################
Case 2: At least one of CPANID, WEBSITE or ORGANIZATION is omitted. E.g., omit CPANID:
[modulemaker] 543 $ grep -A10 -E '^\$mod\s' rt-15563.pl
$mod = ExtUtils::ModuleMaker->new(
NAME => $module_name,
COMPACT => 1,
WEBSITE => 0,
ORGANIZATION => 0,
);
$mod->complete_build();
__END__
[modulemaker] 544 $ perl rt-15563.pl
[modulemaker] 545 $ grep -A8 AUTHOR Foo-Bar/lib/Foo/Bar.pm
=head1 AUTHOR
A. U. Thor
CPAN ID: MODAUTHOR
a.u.thor@a.galaxy.far.far.away
=head1 COPYRIGHT
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the
#####
Result: CPANID is populated from default values. WEBSITE and ORGANIZATION are omitted, as intended, with no extra whitespace.
###################