Skip Menu |

This queue is for tickets about the version CPAN distribution.

Report information
The Basics
Id: 12425
Status: resolved
Priority: 0/
Queue: version

People
Owner: jpeacock [...] cpan.org
Requestors: grousse [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.42
Fixed in: (no value)



Subject: useless shellbang in module
verion pm starts with an useless shellbang, whereas it is not censed to be executable, as other pragmas.
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 will consider removing the '-w' later in the development (i.e. once Perl 5.10.0 is ready to come out, since version.pm is in the core with the 5.9.x series leading up to 5.10.0). But for the moment, the extra diagnostics of '-w' are quite reasonable. Thanks for the comment! John
[JPEACOCK - Wed Apr 27 09:52:32 2005]: 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.
OK, I wasn't aware perl subverted the shellbang for its own use :)
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.