Is using __PACKAGE__ inside my methods bad for inheritance?

oop, perl

Solution

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

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

Problem

If inside my code I'll have calls like: ``` __PACKAGE__->method; ``` will this limit the usability of this module, if this module is inherited?

Original source