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             use strict;
4 21     21   153 use warnings;
  21         53  
  21         631  
5 21     21   111 no warnings qw( once void );
  21         45  
  21         598  
6 21     21   105  
  21         66  
  21         2732  
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 21     21   115 ( "Sub::HandlesVia::Mite", "Sub::HandlesVia::Toolkit::Mouse" );
15             ( *after, *around, *before, *extends, *has, *signature_for, *with ) =
16             do {
17 21         46  
18             no warnings 'redefine';
19             (
20 21     21   161 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
  21         61  
  21         4113  
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 21         1343  
30             BEGIN {
31             require Sub::HandlesVia::Toolkit;
32              
33             use mro 'c3';
34 21     21   10715 our @ISA;
35             push @ISA, "Sub::HandlesVia::Toolkit";
36 21     21   146 }
  21         62  
  21         205  
37 21         74  
38 21         4299 # 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 147     147 0 514 if ( $INC{'Moose/Util.pm'}
44 147         334 and my $meta = Moose::Util::find_meta( ref $self or $self ) )
45 147 50       344 {
46 147 50       293 $meta->can('does_role') and $meta->does_role($role) and return 1;
47 147 50 0     351 }
      33        
48             return $self->SUPER::DOES($role);
49             }
50 0 0 0     0  
51             # Alias for Moose/Moo-compatibility
52 147         437 shift->DOES(@_);
53             }
54              
55             1;