SPUG: Slice of an arrary within a hash?
Stuart Poulin
stuart_poulin at yahoo.com
Fri May 5 20:26:17 CDT 2000
I feel the same, I feel -w is more for development phases.
I sometimes add:
BEGIN {
$^W= $^W || $ENV{PERL_DEV} ? 1 : 0 ;
}
To my scripts. Then set PERL_DEV=true when I'm working on the scripts.
--- Joel <largest at largest.org> wrote:
> > ced at carios2.ca.boeing.com wrote
> >
> > #!/usr/bin/perl -w
> > ^^^^^^
> > ^^^^^^
> > # enable warnings above. See -w
> > # in action below:
>
>
> <$0.02>
>
> -w is a great tool, but I don't put it in the shebang line of my perl
> scripts. This is because it turns on warnings for *all* Perl involved in
> the script, which includes all use'd modules and all modules the use'd
> modules use, and so on. Also, it will sometimes warn me about things that
> I know are okay.
>
> You can turn off the warnings temporarily by local'izing the $^W variable
> around code you know might generate a warning. But at work there are some
> older modules that are crufty and generate lots of (allowable) warnings.
> So I get tired of reading a page of warnings I already know about every
> time I run the script. (yes I realize someone should go fix the old
> modules :-)
>
> My solution? When I'm stumped on a debug or want to verify my code before
> checking into production, I run
>
> perl -cw myscript
>
> which shows me the warnings.
>
> </$0.02>
>
> Joel
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
> SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
> Email to majordomo at pm.org: "action" spug-list your_address
>
>
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
Email to majordomo at pm.org: "action" spug-list your_address
More information about the spug-list
mailing list