File Coverage

blib/lib/Sub/HandlesVia/Toolkit/Moo.pm.mite.pm
Criterion Covered Total %
statement 28 35 80.0
branch 3 8 37.5
condition 1 9 11.1
subroutine 9 9 100.0
pod 0 2 0.0
total 41 63 65.0


line stmt bran cond sub pod time code
1             {
2              
3             use strict;
4 35     35   255 use warnings;
  35         80  
  35         1071  
5 35     35   184 no warnings qw( once void );
  35         81  
  35         1027  
6 35     35   179  
  35         90  
  35         4633  
7             our $USES_MITE = "Mite::Class";
8             our $MITE_SHIM = "Sub::HandlesVia::Mite";
9             our $MITE_VERSION = "0.010008";
10              
11             # Mite keywords
12             BEGIN {
13             my ( $SHIM, $CALLER ) =
14 35     35   180 ( "Sub::HandlesVia::Mite", "Sub::HandlesVia::Toolkit::Moo" );
15             ( *after, *around, *before, *extends, *has, *signature_for, *with ) =
16             do {
17 35         79  
18             no warnings 'redefine';
19             (
20 35     35   260 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
  35         80  
  35         6809  
21             sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) },
22 0         0 sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) },
23 0         0 sub { },
24 0         0 sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) },
25             sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) },
26 0         0 sub { $SHIM->HANDLE_with( $CALLER, @_ ) },
27 0         0 );
28 0         0 }
29 35         2159  
30             BEGIN {
31             require Sub::HandlesVia::Toolkit;
32              
33             use mro 'c3';
34 35     35   17414 our @ISA;
35             push @ISA, "Sub::HandlesVia::Toolkit";
36 35     35   243 }
  35         86  
  35         357  
37 35         120  
38 35         7174 # See UNIVERSAL
39             my ( $self, $role ) = @_;
40             our %DOES;
41             return $DOES{$role} if exists $DOES{$role};
42             return 1 if $role eq __PACKAGE__;
43 665     665 0 1300 if ( $INC{'Moose/Util.pm'}
44 665         873 and my $meta = Moose::Util::find_meta( ref $self or $self ) )
45 665 50       1443 {
46 665 50       1264 $meta->can('does_role') and $meta->does_role($role) and return 1;
47 665 50 0     1377 }
      33        
48             return $self->SUPER::DOES($role);
49             }
50 0 0 0     0  
51             # Alias for Moose/Moo-compatibility
52 665         1624 shift->DOES(@_);
53             }
54              
55             1;