File Coverage

blib/lib/Mite/Role/Tiny.pm.mite.pm
Criterion Covered Total %
statement 35 49 71.4
branch 0 4 0.0
condition n/a
subroutine 9 19 47.3
pod 0 2 0.0
total 44 74 59.4


line stmt bran cond sub pod time code
1             {
2              
3             use strict;
4 7     7   53 use warnings;
  7         14  
  7         219  
5 7     7   31 no warnings qw( once void );
  7         19  
  7         252  
6 7     7   32  
  7         18  
  7         926  
7             our $USES_MITE = "Mite::Class";
8             our $MITE_SHIM = "Mite::Shim";
9             our $MITE_VERSION = "0.010007";
10              
11             # Mite keywords
12             BEGIN {
13             my ( $SHIM, $CALLER ) = ( "Mite::Shim", "Mite::Role::Tiny" );
14 7     7   34 (
15             *after, *around, *before, *extends, *field,
16             *has, *param, *signature_for, *with
17             )
18             = do {
19 7         13  
20             no warnings 'redefine';
21             (
22 7     7   45 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
  7         12  
  7         1513  
23             sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) },
24 0     0   0 sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) },
25 0     0   0 sub { },
26 0     0   0 sub { $SHIM->HANDLE_has( $CALLER, field => @_ ) },
27       7     sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) },
28 0     0   0 sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) },
29 0     0   0 sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) },
30 0     0   0 sub { $SHIM->HANDLE_with( $CALLER, @_ ) },
31 0     0   0 );
32 0     0   0 }
33 7         1082  
34             # Mite imports
35             BEGIN {
36             require Scalar::Util;
37             *STRICT = \&Mite::Shim::STRICT;
38             *bare = \&Mite::Shim::bare;
39 7     7   50 *blessed = \&Scalar::Util::blessed;
40 7         20 *carp = \&Mite::Shim::carp;
41 7         16 *confess = \&Mite::Shim::confess;
42 7         16 *croak = \&Mite::Shim::croak;
43 7         14 *false = \&Mite::Shim::false;
44 7         16 *guard = \&Mite::Shim::guard;
45 7         22 *lazy = \&Mite::Shim::lazy;
46 7         20 *ro = \&Mite::Shim::ro;
47 7         18 *rw = \&Mite::Shim::rw;
48 7         11 *rwp = \&Mite::Shim::rwp;
49 7         13 *true = \&Mite::Shim::true;
50 7         24 }
51 7         24  
52 7         252 BEGIN {
53             require Mite::Role;
54              
55             use mro 'c3';
56 7     7   1106 our @ISA;
57             push @ISA, "Mite::Role";
58 7     7   43 }
  7         19  
  7         58  
59 7         18  
60 7         979 # See UNIVERSAL
61             my ( $self, $role ) = @_;
62             our %DOES;
63             return $DOES{$role} if exists $DOES{$role};
64             return 1 if $role eq __PACKAGE__;
65 0     0 0   return $self->SUPER::DOES($role);
66 0           }
67 0 0          
68 0 0         # Alias for Moose/Moo-compatibility
69 0           shift->DOES(@_);
70             }
71              
72             1;
73