Test::NoOverride - stop accidentally overriding
use Test::NoOverride; no_override('Some::Class'); no_override( 'Some::Class', exclude => [qw/ method /], # methods which you override specifically. ); no_override( 'Some::Class', exclude_overridden => [qw/ Foo::Bar::method /], # ignore to be overridden. );
No more accidentally overriding.
Note that private method (like '_foo') and (import|BEGIN|UNITCHECK|CHECK|INIT|END) methods are ignored (means that these are not checked). Moreover,
new method is ignored by default. If you would like to check overriding 'new' method, then you should set the
new param like below.
no_override( 'Some::Class', new => 1, # The 'new' method will be checked. );
Test::NoOverride is hosted on github: http://github.com/bayashi/Test-NoOverride
Welcome your patches and issues :D
Dai Okabayashi <email@example.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.