MenuGrinder/Role/Plugin.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 3 SCAR 19.5
CC
3
Cov
0%
verify_plugin
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 7.0
1 package WWW::MenuGrinder::Role::Plugin;
2 BEGIN {
3 $WWW::MenuGrinder::Role::Plugin::VERSION = '0.06';
4 }
5  
6 # ABSTRACT: WWW::MenuGrinder role for all plugins.
7  
8 use Moose::Role;
9  
10 has 'grinder' => (
11 is => 'ro',
12 isa => 'WWW::MenuGrinder',
13 required => 1,
14 );
15  
16 sub verify_plugin {
17 my ($self) = @_;
18  
19 if ($self->can('plugin_required_grinder_methods')) {
20 my @methods = $self->plugin_required_grinder_methods;
21 for my $m (@methods) {
22 if (! $self->grinder->can($m)) {
23 die ref($self) . " requires method '$m' but " . ref($self->grinder)
24 . "doesn't provide it.\n";
25 }
26 }
27 }
28 }
29  
30 no Moose::Role;
31  
32 1;
33  
34 __END__