in reply to Old Code reference wants new life as Object.

Build a small wrapper function.

my $self = ...; $dispatch{status_form} = sub { $self->status_form(@_) };

If I'm out to lunch, feel free to tell me that as well.

Not at all. Callbacks are frequently done this way in Perl.

Replies are listed 'Best First'.
Re^2: Old Code reference wants new life as Object.
by Devanchya (Beadle) on Dec 09, 2006 at 01:55 UTC
    Thanks this works perfectly.

    I was orignally attempting to do this with just { } thinking a anon-sub would work. Guess I forgot to run the sub.
    --

    Even smart people are dumb in most things...

      { ... } creates an anonymous hash.
      sub { ... } creates an anonymous sub. It doesn't execute the sub.