Subject: | POD in here-doc is rendered by POD tools |
The POD that occurs in the inline here-doc used to create the template module is found and rendered by things like perldoc and pod2text, and is confusing, to say the least. I've included a patch that, as you suggested, uses ==POD instead of =POD and later s///'s out the extra ='s. All tests pass.
--- Starter.pm Fri Jun 25 19:00:02 2004
+++ Starter.pm-new Fri Jul 9 16:26:49 2004
@@ -223,25 +223,25 @@
my $year = _thisyear();
- return <<"HERE";
+ my $content = <<"HERE";
package $module;
use warnings;
use strict;
-=head1 NAME
+==head1 NAME
$module - The great new $module!
-=head1 Version
+==head1 Version
Version 0.01
-=cut
+==cut
our \$VERSION = '0.01';
-=head1 Synopsis
+==head1 Synopsis
Quick summary of what the module does.
@@ -252,49 +252,51 @@
my \$foo = $module->new();
...
-=head1 Export
+==head1 Export
A list of functions that can be exported. You can delete this section
if you don't export anything, such as for a purely object-oriented module.
-=head1 Functions
+==head1 Functions
-=head2 function1
+==head2 function1
-=cut
+==cut
sub function1 {
}
-=head2 function2
+==head2 function2
-=cut
+==cut
sub function2 {
}
-=head1 Author
+==head1 Author
$author, C<< <$email> >>
-=head1 Bugs
+==head1 Bugs
Please report any bugs or feature requests to
C<bug-$rtname\@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>. I will be notified, and then you'll automatically
be notified of progress on your bug as I make changes.
-=head1 Copyright & License
+==head1 Copyright & License
Copyright $year $author, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
-=cut
+==cut
1; # End of $module
HERE
+ $content =~ s/^==/=/gsm;
+ return $content;
}
=head2 create_Makefile_PL( $basedir, $distro, $main_module )