Geo Geo - 7 months ago 32
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().