MenuGrinder/Role/ItemMogrifier.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
item_mogrify_methods
2.0
BEGIN
2.0
CRAP 2.0
1 package WWW::MenuGrinder::Role::ItemMogrifier;
2 BEGIN {
3 $WWW::MenuGrinder::Role::ItemMogrifier::VERSION = '0.06';
4 }
5  
6 # ABSTRACT: WWW::MenuGrinder role for plugins that modify menus item-by-item per request.
7  
8 use Moose::Role;
9  
10 with 'WWW::MenuGrinder::Role::Plugin';
11  
12  
13 sub item_mogrify_methods {
14 return 'item_mogrify';
15 }
16  
17 after 'verify_plugin' => sub {
18 my ($self) = @_;
19 my $class = ref $self;
20  
21 for my $method ($self->item_mogrify_methods) {
22 if (! $self->can($method)) {
23 die "$class declared item_mogrify_method $method but doesn't provide it.";
24 }
25 }
26 };
27  
28 no Moose::Role;
29  
30 1;
31  
32 __END__