Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Mini-Tutorial: Working with Odd/Even Elements

by ikegami (Patriarch)
on Jul 16, 2009 at 18:32 UTC ( [id://780807]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Mini-Tutorial: Working with Odd/Even Elements
in thread Mini-Tutorial: Working with Odd/Even Elements

By the way, your fixed is still broken. It only works if the calling package is one level away from the root. If the caller is Foo, it works. If the caller is Foo::Bar, it doesn't.

Using a symbolic ref is simpler than using %::.

my $pkg = do { no strict 'refs'; *{caller().'::'} };

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found