in reply to Ref to Method?
Running this:
results in...package foo; sub bar { warn "$self(@_)" } sub tell { $ref = \&bar; warn "$ref" } package main; $ref = foo->can('bar'); warn "$ref"; &$ref('foo'); foo->tell();
CODE(0x914dfb8) at tst.pl line 9. (foo) at tst.pl line 3. CODE(0x914dfb8) at tst.pl line 4.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ref to Method?
by chromatic (Archbishop) on Mar 04, 2009 at 19:24 UTC |