Yes, SUPER:: relies on __PACKAGE__. But you can always provide an explicit package name in your super call...
@Bar::ISA = qw(Foo); sub Bar::xxx { my $self = shift; warn "Bar::xxx called"; return $self->Foo::xxx(@_); # instead of SUPER::xxx }
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
|
---|
In Section
Seekers of Perl Wisdom