Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
(crazyinsomniac) Re: is 1; at the end of a PM still necessary in 5.6.1 ?by crazyinsomniac (Prior) |
on Jul 22, 2001 at 09:15 UTC ( [id://98765]=note: print w/replies, xml ) | Need Help?? |
From permod it says: "1; # don't forget to return a true value from the file" a subroutine is a true value ;-) I don't remember this not working in prior versions.
What exactly is the value of a subroutine? My test code worked on all my ActivePerl and IndigoPerl installations, as well as, jcwren's machine. and the test line: perl -Mtest2 -e"$_=new test2;print $_->Ed_Guine;"
update: So, to avoid all this confusion, just make sure you have 1; before __DATA__ (or __END__ depending on what you use).
In Section
Seekers of Perl Wisdom
|
|