Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Old Code reference wants new life as Object.

by revdiablo (Prior)
on Dec 08, 2006 at 23:11 UTC ( #588726=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Old Code reference wants new life as Object.
in thread Old Code reference wants new life as Object.

In that case, the easiest thing to do is probably:

$dispatch{self_test} = sub { $self->login };

This will create an anonymous code reference that makes a closure on $self, so everything should be in place when the code actually gets called.

Update: Er, which is exactly what ikegami responded with. I guess I should have re-read the original replies before posting.


Comment on Re^3: Old Code reference wants new life as Object.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-29 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls