perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@cpan.org>
Subject Re: [mp2 Patch] ModPerl::Util::undef(coderef)
Date Fri, 20 Jun 2003 07:42:39 GMT
On Thu, 2003-06-19 at 19:31, Geoffrey Young wrote:
> Philippe M. Chiasson wrote:
> > Following the discussion on Apache::Reload and Apache::Symbol, I've
> > taken out Apache::Symbol::undef from mp1, massaged it a bit and made it
> > into ModPerl::Util::undef for mod_perl 2.
> 
> is this really required anymore?
> 
> Apache::Symbol::undef is there explicitly to keep our valid redefines from 
> throwing mandatory errors, but the mandatory error behavior was removed by 
> 5.6 - it's now covered separately through the warnings pragma and can be 
> turned off via $^W=0.
> 
> see
> 
> http://marc.theaimsgroup.com/?l=apache-modperl&m=96599355325073&w=2
> 
> I was only able to find a snippet of Doug's original comments wrt 2.0 - it 
> seems that none of the dev@ archives are complete that far back.  but see 
> the very bottom of
> 
> http://mathforum.org/epigone/modperl-dev/chalcrungwex/A14A9ADE3BEAD311AF95009027B6FBE02B864E@corpex.laserlink.net
> 
> for his quoted thoughts.

Well, that's true expect for what Stas uncovered already. Constant
subroutines will generate a _mandatory_ warning when redefined, even
with no warnings and bleedperl ;-(

#> perl -le 'no warnings; $^W=0; use constant PI => 3.14; undef &PI; sub PI() {
}'
Constant subroutine PI redefined at -e line 1.

So I guess we _still_ could make use of such functionnality

> HTH
> 
> --Geoff
> 
> 
-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'


Mime
View raw message