lib/Mite/App/Command/compile.pm

filter: Statementstmt 96.9% 32 / 33 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 2 totaltotal 91.1% 41 / 45 CC 3 SCAR 5.6
CC
3
Cov
95%
execute
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« lib/Mite/Source.pm ↑ Summary lib/Mite/Trait/HasDestructor.pm »
1 24 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 24 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 24 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Mite::App::Command::compile;
6 24 ▶use Mite::Miteception -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 24 extends 'Mite::App::Command' => { -version => '0.009000' };
8  
9 24 our $AUTHORITY = 'cpan:TOBYINK';
10 24 our $VERSION = '0.013000';
11  
12 24 ▶sub abstract {
Subroutine abstract: called CC=1 SCAR=0.0
Pod undocumented
13 24 return "Make your code ready to run.";
14 }
15  
16 9 ▶sub execute {
Subroutine execute: called CC=3 SCAR=11.0
Pod undocumented
17 9 my $self = shift;
18  
19 9 require Mite::Attribute;
20 9 require Mite::Class;
21 9 require Mite::Config;
22 9 require Mite::Project;
23 9 require Mite::Role;
24 9 require Mite::Role::Tiny;
25 9 require Mite::Signature;
26  
27 9 ▶ return 0 if $self->should_exit_quietly;
Branch: 1 branch
BranchTrueFalseTotal
if $self->should_exit_quietly 4 5 9
28  
29 5 my $project = $self->project;
30  
31 # This is a hack to force Mite::* modules which are already loaded
32 # to be loaded again so Mite can compile itself.
33 #
34 5 ▶ if ( $self->config->data->{dogfood} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->config->data->{"dogfood"}) 0 4 4
35 0 $project->_module_fakeout_namespace(
36 sprintf 'A%02d::B%02d', int(rand 100), int(rand 100)
37 );
38 }
39  
40 4 $project->add_mite_shim;
41 4 $project->load_directory;
42 4 $project->write_mites;
43 4 $project->write_mopper;
44  
45 4 return 0;
46 }
47  
48 24 1;
« lib/Mite/Source.pm ↑ Summary lib/Mite/Trait/HasDestructor.pm »