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

Re: method aliases with goto(&NAME)

by Anonymous Monk
on Sep 17, 2013 at 10:57 UTC ( #1054420=note: print w/replies, xml ) Need Help??

in reply to method aliases with goto(&NAME)

ask if anyone sees any drawback to this approach.

There are none except in the name -- goto -- kinda like "eval" -- scary for the scaredy

OTOH *oldname = *newname;

Replies are listed 'Best First'.
Re^2: method aliases with goto(&NAME)
by citromatik (Curate) on Sep 17, 2013 at 11:04 UTC
    OTOH *oldname = *newname;

    Yes, I also thought about something like that, but the goto version allows to include more code in the legacy method if needed:

    sub legacy_code { warn ("This method is deprecated, use current_method instead"); goto(&current_method); }


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054420]
[shmem]: que descanses bien, aprendiz
shmem wuff & wech
[shmem]: erm. wrong link. wrong link!
[shmem]: que descanses bien, aprendiz
[Discipulus]: bravo!

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2017-04-29 23:01 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (534 votes). Check out past polls.