Hello,
Is it possible to, automatically, call some other method before calling the final method?
package Foo { sub new { bless [] }; sub msg { print "On my way to '%s'\n"; # name of the final method is op +tional } sub Berlin { print "I'm in Berlin!\n"; } sub Paris { print "I'm in Paris!\n"; } }; my $obj = Foo->new; $obj->Berlin(); # should go first in msg(), then in Berlin()
Thanks
In reply to Calling an intermediate method by trizen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |