in reply to Re^2: Overriding several methods using 'local'
in thread Overriding several methods using 'local'

In response to your update:

This is where inheritance is quite useful.

package My::AnyPackage; use base 'AnyPackage'; sub can_read { 1 };

Now, whenever you would do my $obj = AnyPackage->new( ... );, instead you now do my $obj = My::AnyPackage->new( ... );. And it will "Just Work".


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?