in reply to Constant redefined

I have not been able to test it, but maybe this would work:
use constant foo => 1; BEGIN { undef &foo } use constant foo => 2;

update: well, it silences the original warning but causes a new one related to changed prototypes.

Replies are listed 'Best First'.
Re^2: Constant redefined
by salva (Canon) on May 31, 2005 at 13:54 UTC
    this actually works:
    use warnings; use constant foo => 10; BEGIN { no warnings; undef &foo; *foo = sub () {20} }