I want to write a module which allows me to quickly detect if a method is
overriding a parent class method (I already know about the method cache
invalidation problem).
Potential uses would be for something like this:
use Attribute::Override;
use parent 'Some::Class';
sub foo :override{...} # fails if it doesn't override
sub bar {...} # fails if it does override
Or:
# needs to
use Method::Override;
Method::Override::overriden(qw/foo/); # must be done after compilation
That can solve nasty problems where the developer accidentally overrides a
parent method but doesn't realize it. Still trying to figure out a "good"
interface, otherwise it will never get used (unless it's built in to the
language, I suspect it will never get used anyway, but what the heck :)
Suggestions?
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6