package LikeOOModule; use base 'MyOOModule'; sub foo { my $self = shift; if ($self->mode == $self->OO_THIS) { ... } elsif ($self->mode == $self->OO_THAT) { ... } }
Solves the problem and allows for overloading, if necessary. Don't let the fact that it's currently a constant blind you to the fact that you may want to override it later. (Particularly in testing, I've found.)
In reply to Re: use base 'XYZ' and exporting
by dragonchild
in thread use base 'XYZ' and exporting
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |