logo       

Re: [patch] shutting down 'constant sub redefined' in Apache::Reload: msg#00283

Subject: Re: [patch] shutting down 'constant sub redefined' in Apache::Reload
On Mon, 2003-05-26 at 17:16, Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> > On Mon, 2003-05-26 at 15:46, Stas Bekman wrote:
> > 
> >>Currently if you have used a constant sub in your code, Apache::Reload will 
> >>complain every time the code is reloaded. And for a good reason:
> >>http://groups.google.com/groups?threadm=20020519214851.3981.qmail%40airtrout.tregar.com
> >>http://archive.develooper.com/perl5-changes%40perl.org/msg04919.html
> >>
> >>However it's a bad thing not being able to shut those warning, if you know 
> >>that you didn't modify the constant subs. The approach suggested by Rafael 
> >>is 
> >>to use $SIG{__WARN__} override, only for those who know what they are doing:
[...]
> > 
> > 
> > I am not sure about this one, but I would say that this will cut the
> > grass from under the feet of a module that installed his/her own
> > SIG{__WARN__} handler, won't it ?
> 
> it sure would. Messing with SIG{__(WARN|DIE)__} is always a bad idea if it's 
> not under your control.
> 
> > Wouldn't it be possible for Apache::Reload to somehow turn off the CONST
> > flag on that CV before attempting to re-define it? (didn't check if
> > that's even remotly possibly)
> 
> Perl doesn't provide any API to shut this down. See the recent question about 
> this on p5p (from me).

Just caught up on the p5p postings. In light of that, I would think that
using SIG{__WARN__} is indeed that best course of action. I'd just make
sure to mark it with red tape, so that when an Apache::Reload gets
strange behaviour in previously working $SIG{WARN} catching, we'll be
able to point at the documentation and say : "Told you so" ;-p

And this is most certainly something broken with Perl, as no warnings
FATAL => 'all' should shield you from that annoying redefinition
warning. Oh well...

> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxx
> For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxx
-- 
-- -----------------------------------------------------------------------------
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}'

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe