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.
new
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 <bayashi@cpan.org>
Module::Functions
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Test::NoOverride, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::NoOverride
CPAN shell
perl -MCPAN -e shell install Test::NoOverride
For more information on module installation, please visit the detailed CPAN module installation guide.