Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588726]
thezip vouches for that, but then forgets what he was vouching for...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2018-06-21 16:46 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.