NAME
Test::NoOverride - stop accidentally overriding
SYNOPSIS
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.
);
DESCRIPTION
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.
);
REPOSITORY
Test::NoOverride is hosted on github: http://github.com/bayashi/Test-NoOverride
Welcome your patches and issues :D
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.