Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Alias for object namespace

by broquaint (Abbot)
on Jan 29, 2005 at 01:34 UTC ( #426166=note: print w/replies, xml ) Need Help??


in reply to Alias for object namespace

To achieve such aliasing in code simply qualify the package name with a trailing :: e.g
{ package foo; sub meth { printf "I was declared in %s, but called with %s\n", __PACKAGE__, $_[0]; } } *bar:: = *foo::; bar->meth; __output__ I was declared in foo, but called with bar
HTH

_________
broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://426166]
help
Chatterbox?
[planetscape]: sleep well, Corion
[stonecolddevin]: erix seems pretty good, i listened to "So Many Roads" and it was nice. Not everyone's cup of tea but this guy can absolutely shred, he and the guy from Mastodon are definitely up there: https://www. youtube.com/watch? v=VzhMkSN9dQc
[erix]: ha, good stuff - loud and fast...
[stonecolddevin]: here's some Mastodon for when you have 13 minutes to have your mind blown: https://www. youtube.com/watch? v=4pvfQtUhtNE

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-06-22 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.