Re: use warnings vs -w

2007-02-09 Thread Tom Phoenix
On 2/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: After 20 minutes of web scouring can anyone tell if there is there a difference between 'use warnings' and '-w'. Should I care? Did you see the perllexwarn manpage anywhere in your scouring? Cheers! --Tom Phoenix Stonehenge Perl Trainin

Re: "use warnings" not working in Perl 5.8.8

2006-04-15 Thread Tom Phoenix
On 4/15/06, mattesonweb <[EMAIL PROTECTED]> wrote: > !# /usr/bin/perl > use warnings; You need to reverse those first two characters. Pound-bang is the traditional start of executable scripts. But when reversed, Perl thinks you're trying to negate the boolean value of 'use warnings', and that's n

Re: use warnings

2005-01-15 Thread Johannes Lichtenberger
"Mark Cohen" <[EMAIL PROTECTED]> writes: > While the use strict is quite clear to me "Perl pragma to restrict unsafe > contructs" , > the use warnings "Perl pragma to control optional warnings" is not. > What programming risks could I get without the use warnings ? ,[ perldoc perllexwarn ] |

Re: use warnings

2005-01-13 Thread Owen Cook
On Fri, 14 Jan 2005, Mark Cohen wrote: > > While the use strict is quite clear to me "Perl pragma to restrict unsafe > contructs" , > the use warnings "Perl pragma to control optional warnings" is not. > What programming risks could I get without the use warnings ? perldoc -q warnings Found in

Re: use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread david
Mystik Gotan wrote: > No. Use warnings is a module, the -w flag is just some extra for error > trapping (which sometimes really is useful!). But it's alright using both > (along with strict, ofcourse). So -w is a built in 'function' and > warnings.pm is just a module. > > (BTW, using the -T flag

Re: use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread Chris Ball
>> On 26 Nov 2002 09:57:44, Dylan Boudreau <[EMAIL PROTECTED]> said: > Is use warnings; the same as #!/usr/bin/perl -w Good question. They're similar, but 'use warnings': - only works under Perl 5.6+ - works _lexically_, rather than globally - this means that you can do this: pack

Re: use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread Mystik Gotan
No. Use warnings is a module, the -w flag is just some extra for error trapping (which sometimes really is useful!). But it's alright using both (along with strict, ofcourse). So -w is a built in 'function' and warnings.pm is just a module. (BTW, using the -T flag for Taint Checking can also pr

RE: use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread wiggins
No. use warnings is file scoped. -w is 'executable' scoped. In other words any modules that you 'use' will inherit the -w but not the 'use'. At least that is my understanding from the Camel. And appears to be the case from what I have seen in action. http://danconia.org --

RE: " use warnings;" doesn't work

2002-10-10 Thread nkuipers
If you put the -w flag in your shebang line like this #!/usr/bin/perl -w does it still throw an exception or do the warnings work? >= Original Message From stanley <[EMAIL PROTECTED]> = >i use solaris and ihave no root right.the version of perl5.005_03 > >in a simple script if i try to

RE: " use warnings;" doesn't work

2002-10-10 Thread Jenda Krynicky
> both #!/usr/bin/perl -w and perl -w my.pl will do the warnings > work,but use warnings will throw exception. if i setup a file called > warnings.pm(it only conatins 1) in my lib and don't use directive or > option,there is no warning and exception stanley Put $^W = 1; into your warni

Re: " use warnings;" doesn't work

2002-10-09 Thread Michael Fowler
On Wed, Oct 09, 2002 at 07:55:13PM -0700, stanley wrote: > #!/usr/bin/perl -w > > does it still throw an exception or do the warnings work? -w on the shebang or command lines will work with any version of Perl. The use warnings pragma was added in 5.6.0, and this is why you're getting the error

Re: " use warnings;" doesn't work

2002-10-09 Thread stanley
Todd how do you turn off the warning ? stanley > > i use solaris and ihave no root right.the version of perl5.005_03 > > in a simple script if i try to add "use warnings",it will say Can't locate > warnings in @inc(@inc..) > > instead if i use perl -w my.pl,it will give me the warning inf

RE: " use warnings;" doesn't work

2002-10-09 Thread stanley
both #!/usr/bin/perl -w and perl -w my.pl will do the warnings work,but use warnings will throw exception. if i setup a file called warnings.pm(it only conatins 1) in my lib and don't use directive or option,there is no warning and exception stanley nkuipers wrote: If you put the -w flag in

Re: " use warnings;" doesn't work

2002-10-09 Thread Todd Wade
Stanley wrote: > > i use solaris and ihave no root right.the version of perl5.005_03 > > in a simple script if i try to add "use warnings",it will say Can't locate > warnings in @inc(@inc..) > > instead if i use perl -w my.pl,it will give me the warning information. so > how can i modify m