At 11:09 PM 8/7/00 +0200, Bart Lateur wrote:
>On Tue, 8 Aug 2000 06:44:00 +1000 (EST), Damian Conway wrote:
>
> >   > A true value indicates that the file is indeed valid Perl.
> >
> >So is an empty file! :-)
>
>That is precisely the problem. You won't get a syntax error if this
>happens.
>
>Now, bringing in the million monkeys typing, again: the chances of
>getting a corrupt file that yet is valid Perl source file, is *far*
>greater, if empty files are allowed as well.
>
>Empty files won't return a true value.

If the only realistic case you want to catch is an empty file, why not just 
check for that and issue an error?  Easier than everyone in the world 
having to stick 1; at the end of their .pm (who's forgotten it, now?  Hands 
up...)


--
Peter Scott
Pacific Systems Design Technologies

Reply via email to