line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
11260
|
use 5.010001; |
|
16
|
|
|
|
|
57
|
|
2
|
16
|
|
|
16
|
|
85
|
use strict; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
404
|
|
3
|
16
|
|
|
16
|
|
138
|
use warnings; |
|
16
|
|
|
|
|
54
|
|
|
16
|
|
|
|
|
1067
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Mite::Miteception -all; |
6
|
16
|
|
|
16
|
|
116
|
extends qw(Mite::App::Command); |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
137
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
9
|
|
|
|
|
|
|
our $VERSION = '0.010008'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
return "Preview the .mite.pm for a file."; |
12
|
|
|
|
|
|
|
} |
13
|
16
|
|
|
16
|
0
|
82
|
|
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; |