Geo Geo - 8 months ago 34
Perl Question

Is using __PACKAGE__ inside my methods bad for inheritance?

If inside my code I'll have calls like:


will this limit the usability of this module, if this module is inherited?


That depends. Sometimes __PACKAGE__->method() is exactly what you need.

Otherwise it's better to use ref($self)->class_method() or $self->method().