Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Constant redefined

by salva (Canon)
on May 31, 2005 at 13:54 UTC ( [id://462057]=note: print w/replies, xml ) Need Help??


in reply to Re: Constant redefined
in thread Constant redefined

this actually works:
use warnings; use constant foo => 10; BEGIN { no warnings; undef &foo; *foo = sub () {20} }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://462057]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2025-03-17 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (54 votes). Check out past polls.