develooper Front page | perl.perl5.porters | Postings from May 2003

Re: [perl #22291] 5.8.x: no warnings "redefine" doesn't affect constant subs

Thread Previous | Thread Next
From:
Stas Bekman
Date:
May 25, 2003 05:30
Subject:
Re: [perl #22291] 5.8.x: no warnings "redefine" doesn't affect constant subs
Message ID:
3ED0B761.9030802@stason.org
Rafael Garcia-Suarez wrote:
> Stas Bekman (via RT) wrote:
> 
>>   % perl-5.8.1 -le' use warnings; use constant FOO => 1; \
>>     no warnings "redefine"; use constant FOO => 2;'
>>Constant subroutine main::FOO redefined at
>>/home/stas/perl/5.8.1/lib/5.8.1/constant.pm line 108.
>>
>>you can't turn this one off even with $^W=0; the problem exists in 5.8.0
>>and blead-perl.
> 
> 
> Sam Tregar asked the same question : (and Nick I-S provided a rationale)
> 
>     http://groups.google.com/groups?threadm=20020519214851.3981.qmail%40airtrout.tregar.com
> 
> I more or less documented the fact :
> 
>     http://archive.develooper.com/perl5-changes%40perl.org/msg04919.html

Thanks for the reference reading, Rafael.

However I'd very much like to have a mechanism to shut this warning up. The 
reason: if you are using Apache::Reload while developing mod_perl modules, 
inability of shutting down this warnings forces you to avoid the usage of 
constants, because you want to keep your error log free of useless (for 
development purpose) clutter. I want to be able to shut those down, and I'm 
aware of the consequences. It sounds like a not perl-ish way, if you can't 
make perl quiet.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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