File Coverage

blib/lib/Sub/HandlesVia/Toolkit/Mouse.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             package Sub::HandlesVia::Toolkit::Mouse;
4 21     21   152 use strict;
  21         46  
  21         648  
5 21     21   123 use warnings;
  21         63  
  21         619  
6 21     21   116 no warnings qw( once void );
  21         55  
  21         2870  
7              
8             our $USES_MITE = "Mite::Class";
9             our $MITE_SHIM = "Sub::HandlesVia::Mite";
10             our $MITE_VERSION = "0.012000";
11              
12             # Mite keywords
13             BEGIN {
14 21     21   101 my ( $SHIM, $CALLER ) =
15             ( "Sub::HandlesVia::Mite", "Sub::HandlesVia::Toolkit::Mouse" );
16             ( *after, *around, *before, *extends, *has, *signature_for, *with ) =
17 21         58 do {
18              
19             package Sub::HandlesVia::Mite;
20 21     21   163 no warnings 'redefine';
  21         63  
  21         4086  
21             (
22 0         0 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
23 0         0 sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) },
24 0         0 sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) },
25             sub { },
26 0         0 sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) },
27 0         0 sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) },
28 0         0 sub { $SHIM->HANDLE_with( $CALLER, @_ ) },
29 21         1227 );
30             };
31             }
32              
33             BEGIN {
34 21     21   10719 require Sub::HandlesVia::Toolkit;
35              
36 21     21   151 use mro 'c3';
  21         57  
  21         185  
37 21         76 our @ISA;
38 21         4505 push @ISA, "Sub::HandlesVia::Toolkit";
39             }
40              
41             # See UNIVERSAL
42             sub DOES {
43 147     147 0 299 my ( $self, $role ) = @_;
44 147         205 our %DOES;
45 147 50       352 return $DOES{$role} if exists $DOES{$role};
46 147 50       291 return 1 if $role eq __PACKAGE__;
47 147 50 0     384 if ( $INC{'Moose/Util.pm'}
      33        
48             and my $meta = Moose::Util::find_meta( ref $self or $self ) )
49             {
50 0 0 0     0 $meta->can('does_role') and $meta->does_role($role) and return 1;
51             }
52 147         504 return $self->SUPER::DOES($role);
53             }
54              
55             # Alias for Moose/Moo-compatibility
56             sub does {
57 147     147 0 9521 shift->DOES(@_);
58             }
59              
60             1;
61             }