develooper Front page | perl.perl5.porters | Postings from February 2009

Re: deprecating Switch.pm

Thread Previous | Thread Next
From:
Bram
Date:
February 23, 2009 13:28
Subject:
Re: deprecating Switch.pm
Message ID:
20090223222908.gfmj7dugowkko404@horde.wizbit.be
> 9: Is it possible to have a warning that defaults to on, so that one has to
>    explicitly go no warnings 'deprecated' to shut it up?

The place to do this seems to be in  
http://perl5.git.perl.org/perl.git/blob/HEAD:/warnings.pl

Currently the warnings: inplace, internal, debugging and malloc are  
enabled by default:

$ perl -e '$^I=".bak";@ARGV="/dev/null";while (<>) { print; }'
Can't do inplace edit: /dev/null is not a regular file at -e line 1

$ perl -e 'no warnings "inplace"; $^I=".bak";@ARGV="/dev/null";while  
(<>) { print; }'
(no output)

$ perl -e 'no warnings "severe"; $^I=".bak";@ARGV="/dev/null";while  
(<>) { print; }'
(no output)

$ perl -e 'no warnings; $^I=".bak";@ARGV="/dev/null";while (<>) { print; }'
(no output)



Kind regards,

Bram





Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About