Note: Beware! Default reply-to is to the list.
On Sep 29, 2010, at 3:22 PM, Anne Wainwright wrote:
end of ever so much more perl code
final pod comments
more final pod comments
The __END__ is not needed in this example because there is no code
following the __END__ which you might want to hide from the Perl
Parser. When the parser reaches '=head1', it knows it has reached
POD and deals with it accordingly.
The simplest explanation of __END__ I could find is here:
Depending on circumstances, the '1;' may not be needed, either.
The '1;' is merely the prototypical case of ending a file with a
statement that Perl evaluates as true. You could just as easily
follow Mark-Jason Dominus' practice of ending a module with:
'cogito ergo sum';
You need to end the file with a statement that evaluates to true if
and only if the file is going to be imported by 'use', 'require' or
'do' into some other Perl program. A '.pm' module you will download
from CPAN typically ends with '1;' for this reason. But a standalone
Perl script doesn't need it.
Whether your file needs to end in a true statement or not, you can
write POD following the final code statement.
Thank you very much.
Za-pm mailing list
posts also archived on Mail Archive