in reply to Re: Need help with clashing method names
in thread Need help with clashing method names
Trying using 'base' to inherit methods from another module and avoid automatically importing methods.
No one said B::moo was a method. For example, B::moo could be Encode::encode
{ package Child; use Base qw( ); use Encode qw( encode ); our @ISA = 'Base'; sub another_method { ... my $x = encode('UTF-16le', $y); ... } } { package Base; sub encode { ... } sub some_method { ... my $c = $self->encode($p); # Can call Encode::encode($self,$p)! ... } } Child->new()->some_method();
|
|---|