File Coverage

blib/lib/Mite/App/Command/preview.pm.mite.pm
Criterion Covered Total %
statement 38 53 71.7
branch 0 8 0.0
condition 0 9 0.0
subroutine 10 19 52.6
pod 0 2 0.0
total 48 91 52.7


line stmt bran cond sub pod time code
1             {
2              
3             package Mite::App::Command::preview;
4 16     16   145 use strict;
  16         56  
  16         588  
5 16     16   121 use warnings;
  16         64  
  16         2058  
6 16     16   119 no warnings qw( once void );
  16         81  
  16         2517  
7              
8             our $USES_MITE = "Mite::Class";
9             our $MITE_SHIM = "Mite::Shim";
10             our $MITE_VERSION = "0.011000";
11              
12             # Mite keywords
13             BEGIN {
14 16     16   99 my ( $SHIM, $CALLER ) =
15             ( "Mite::Shim", "Mite::App::Command::preview" );
16             (
17             *after, *around, *before, *extends, *field,
18             *has, *param, *signature_for, *with
19             )
20 16         41 = do {
21              
22             package Mite::Shim;
23 16     16   115 no warnings 'redefine';
  16         67  
  16         3893  
24             (
25 0     0   0 sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) },
26 16     16   240 sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) },
27 0     0   0 sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) },
28       16     sub { },
29 0     0   0 sub { $SHIM->HANDLE_has( $CALLER, field => @_ ) },
30 0     0   0 sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) },
31 0     0   0 sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) },
32 0     0   0 sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) },
33 0     0   0 sub { $SHIM->HANDLE_with( $CALLER, @_ ) },
34 16         3308 );
35             };
36             }
37              
38             # Mite imports
39             BEGIN {
40 16     16   158 require Scalar::Util;
41 16         92 *STRICT = \&Mite::Shim::STRICT;
42 16         78 *bare = \&Mite::Shim::bare;
43 16         55 *blessed = \&Scalar::Util::blessed;
44 16         53 *carp = \&Mite::Shim::carp;
45 16         48 *confess = \&Mite::Shim::confess;
46 16         72 *croak = \&Mite::Shim::croak;
47 16         76 *false = \&Mite::Shim::false;
48 16         49 *guard = \&Mite::Shim::guard;
49 16         54 *lazy = \&Mite::Shim::lazy;
50 16         60 *lock = \&Mite::Shim::lock;
51 16         54 *ro = \&Mite::Shim::ro;
52 16         51 *rw = \&Mite::Shim::rw;
53 16         63 *rwp = \&Mite::Shim::rwp;
54 16         47 *true = \&Mite::Shim::true;
55 16         818 *unlock = \&Mite::Shim::unlock;
56             }
57              
58             BEGIN {
59 16     16   7311 require Mite::App::Command;
60              
61 16     16   144 use mro 'c3';
  16         44  
  16         423  
62 16         100 our @ISA;
63 16         3046 push @ISA, "Mite::App::Command";
64             }
65              
66             # See UNIVERSAL
67             sub DOES {
68 0     0 0   my ( $self, $role ) = @_;
69 0           our %DOES;
70 0 0         return $DOES{$role} if exists $DOES{$role};
71 0 0         return 1 if $role eq __PACKAGE__;
72 0 0 0       if ( $INC{'Moose/Util.pm'}
      0        
73             and my $meta = Moose::Util::find_meta( ref $self or $self ) )
74             {
75 0 0 0       $meta->can('does_role') and $meta->does_role($role) and return 1;
76             }
77 0           return $self->SUPER::DOES($role);
78             }
79              
80             # Alias for Moose/Moo-compatibility
81             sub does {
82 0     0 0   shift->DOES(@_);
83             }
84              
85             1;
86             }