in reply to Re^2: what's a proper way to code method synonyms
in thread what's a proper way to code method synonyms
Personally, I'd go with;*{$new_method} = sub { my $self = shift; $self->$main_spelling(@_) }
so that caller() would still work right.*{$new_method} = sub { goto &{$_[0]->can($main_spelling)} }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
---|
In Section
Seekers of Perl Wisdom