line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
12115
|
use 5.010001; |
|
16
|
|
|
|
|
76
|
|
2
|
16
|
|
|
16
|
|
101
|
use strict; |
|
16
|
|
|
|
|
63
|
|
|
16
|
|
|
|
|
525
|
|
3
|
16
|
|
|
16
|
|
119
|
use warnings; |
|
16
|
|
|
|
|
72
|
|
|
16
|
|
|
|
|
10983
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Mite::Miteception -all; |
6
|
16
|
|
|
16
|
|
132
|
extends qw(Mite::App::Command); |
|
16
|
|
|
|
|
57
|
|
|
16
|
|
|
|
|
200
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
9
|
|
|
|
|
|
|
our $VERSION = '0.011000'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
return "Preview the .mite.pm for a file."; |
12
|
|
|
|
|
|
|
} |
13
|
16
|
|
|
16
|
0
|
73
|
|
14
|
|
|
|
|
|
|
around _build_kingpin_command => sub { |
15
|
|
|
|
|
|
|
my ( $next, $self, @args ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $command = $self->$next( @args ); |
18
|
|
|
|
|
|
|
$command->arg( 'file', 'Path to file to preview.' )->required->existing_file; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return $command; |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
return 0 if $self->should_exit_quietly; |
26
|
0
|
|
|
0
|
0
|
|
|
27
|
|
|
|
|
|
|
my $file = $self->kingpin_command->args->get( 'file' )->value; |
28
|
0
|
0
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $project = $self->project; |
30
|
0
|
|
|
|
|
|
$project->load_directory; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$project->load_files( [ $file ], '.' ) |
33
|
0
|
|
|
|
|
|
unless $project->sources->{$file}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $source = $project->source_for( $file ); |
36
|
0
|
0
|
|
|
|
|
print $source->compile; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return 0; |
39
|
0
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
1; |