Re: Avoiding redefining constant subs

2000-04-20 Thread Doug MacEachern
> Sorry--you're quite right... it's not a mandatory warning at all any more. I > run all my scripts when developing under -w, so I still get the warning. > > I think it would be useful to specifically check that the sub is not already > defined in the caller's namespace: > if (!(defined &{"${pkg}

Re: Avoiding redefining constant subs

2000-04-13 Thread Jeremy Howard
> > I've been getting frustrated by the mandatory warning created by 'use > > constant' under mod_perl, caused by constant subroutines being redefined > > when imported. In particular, with Archive::Zip this was adding hundreds of > > lines to my log every restart. > > what version of Perl are you

Re: Avoiding redefining constant subs

2000-04-11 Thread Doug MacEachern
On Thu, 6 Apr 2000, Jeremy Howard wrote: > Hi there, > > I've been getting frustrated by the mandatory warning created by 'use > constant' under mod_perl, caused by constant subroutines being redefined > when imported. In particular, with Archive::Zip this was adding hundreds of > lines to my lo

Avoiding redefining constant subs

2000-04-05 Thread Jeremy Howard
Hi there, I've been getting frustrated by the mandatory warning created by 'use constant' under mod_perl, caused by constant subroutines being redefined when imported. In particular, with Archive::Zip this was adding hundreds of lines to my log every restart. I've edited constant.pm and Exporter