Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Constant subroutine main::C redefined

by Corion (Pope)
on Sep 10, 2012 at 12:11 UTC ( #992740=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Constant subroutine main::C redefined
in thread Constant subroutine main::C redefined

Also note that "redefining" a constant does not necessarily do what BrowserUk wants. The constants get inlined, so redefining them only works from that point on:

use constant C => 1; sub c { C }; use constant C => 2; sub d { C }; print c(); # 1 print d(); # 2


Comment on Re^4: Constant subroutine main::C redefined
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2016-02-13 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (422 votes), past polls