Do you want people to be able to subclass Very::Long::Name? In that case, hardcoding the subroutine reference won't allow them to override foo(). This will:
return $self->bar( $self->can( 'foo' ) );(Also change to the two-arg form of bless if subclassability is important.)
In reply to Re: __PACKAGE__ and method reference
by chromatic
in thread __PACKAGE__ and method reference
by Realbot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |