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.
In reply to Re: Ref to Method?
by Bloodnok
in thread Ref to Method?
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |