On Wed Apr 27 09:52:32 2005, JPEACOCK wrote:
Show quoted text> It's not useless. The version.pm file is not shipped with the execute
> bit set, so the shebang line never comes into play (by the shell
> anyway). The presence of the '-w' on the line, however, means that
> warnings are turned on globally (as opposed to lexically with 'use
> warnings'), which is very much appropriate for an experimental pragma
> like version.pm.
I'm having problems reproducing the effect of -w. To test it, I'm
commenting out "use strict", then adding a 'print $foo, "\n";' somewhere
in the file. With warnings on, that should result in an "Use of
uninitialized value" warning, right? However:
$ perl -Mversion -e ''
(no output)
$ perl -w -Mversion -e ''
Use of uninitialized value in print at
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/version.pm
line 18.
IOW, the shebang with the -w doesn't seem to have any effect here. This
is Perl 5.8.8 on Fedora Core 5 test 3, version.pm 0.57.