When you instantiated the Hi package you passed references to some subroutines, in method_b for example you return the reference back to the caller, you are not executing the method
Consider this
my $sub_ref = \sub { my $who = shift; print "hello $who\n"; }; #In order to execute need to deref by prefixing with $ $$sub_ref->('dude');
coderefs are tricky so try to keep your examples simple until you get the grasp on it
In reply to Re^2: Noob OO Question
by bluescreen
in thread Noob OO Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |