|
Posted by sisyphus on January 9, 2008, 3:36 am
Please log in for more thread options > Gunnar Hjalmarsson wrote:
> > Steve Roscio wrote:
> >> Does it makes sense to include a shebang line at the top of a .pm
> >> file? =A0For example:
>
> >> #!/usr/bin/perl -w
> >> use strict;
> >> =A0 =A0.
> >> =A0 =A0.
> >> =A0 =A0.
>
> >> Or is it more appropriate to omit the shebang line, since the .pm
> >> isn't "executed" per-se, and instead 'use warnings;'?
>
> > That sounds very much as a SAQ (Self Answered Question) to me. ;-)
>
> OK, I'll take that to mean:
> =A0 =A0nuke the shebang lines, use warnings.
Except that there *are* differences between "use warnings" and the "-
w" flag. So I guess that if you wanted to enforce the "-w" switch in
preference to "use warnings", then you would have to do it via a
shebang line. (Read that last sentence as a question ... as much as an
assertion.)
I seem to recall that some people take exception to modules turning on
the "-w" switch. I think some people might even object to "use
warnings" in modules ... but I'm not au fait with the reasoning (re
either situation) off the top of my head.
Cheers,
Rob
|