File Coverage

blib/lib/Sub/HandlesVia/Toolkit/Moose.pm.mite.pm
Criterion Covered Total %
statement 28 35 80.0
branch 3 8 37.5
condition 2 9 22.2
subroutine 9 9 100.0
pod 0 2 0.0
total 42 63 66.6


line stmt bran cond sub pod time code
1             {
2              
3             use strict;
4 22     22   153 use warnings;
  22         50  
  22         735  
5 22     22   114 no warnings qw( once void );
  22         48  
  22         654  
6 22     22   121  
  22         70  
  22         2967  
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 22     22   113 ( "Sub::HandlesVia::Mite", "Sub::HandlesVia::Toolkit::Moose" );
15             ( *after, *around, *before, *extends, *has, *signature_for, *with ) =
16             do {
17 22         58  
18             no warnings 'redefine';
19             (
20 22     22   164 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
  22         58  
  22         4454  
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 22         1365  
30             BEGIN {
31             require Sub::HandlesVia::Toolkit;
32              
33             use mro 'c3';
34 22     22   11273 our @ISA;
35             push @ISA, "Sub::HandlesVia::Toolkit";
36 22     22   151 }
  22         56  
  22         282  
37 22         81  
38 22         4677 # 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 154     154 0 686 if ( $INC{'Moose/Util.pm'}
44 154         379 and my $meta = Moose::Util::find_meta( ref $self or $self ) )
45 154 50       379 {
46 154 50       317 $meta->can('does_role') and $meta->does_role($role) and return 1;
47 154 50 33     771 }
      33        
48             return $self->SUPER::DOES($role);
49             }
50 0 0 0     0  
51             # Alias for Moose/Moo-compatibility
52 154         2001 shift->DOES(@_);
53             }
54              
55             1;