In both cases $f holds a reference to A::fpackage A; sub f { print "I'm f\n" } package B; @ISA=qw(A); package main; my $f = B->can('f'); $f->(); $f = A->can('f'); $f->();
Dave.
In reply to Re: reference to a subroutine inside a package
by dave_the_m
in thread reference to a subroutine inside a package
by imcsk8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |