line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::fbx; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
548
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
14
|
use 5.008001; |
|
1
|
|
|
|
|
3
|
|
6
|
1
|
|
|
1
|
|
341
|
use FFI::Build::MM; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
1
|
|
|
1
|
|
5
|
use Cwd qw( getcwd ); |
|
1
|
|
|
|
|
27
|
|
|
1
|
|
|
|
|
50
|
|
8
|
1
|
|
|
1
|
|
5
|
use File::Basename qw( basename dirname ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
231
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Command line interface to FFI::Build |
11
|
|
|
|
|
|
|
our $VERSION = '0.11'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub main |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
0
|
0
|
|
my(undef, @ARGV) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
unless(-f 'fbx.json') |
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
|
|
|
my $mm = FFI::Build::MM->new; |
21
|
0
|
|
|
|
|
|
$mm->mm_args( DISTNAME => basename getcwd() ); |
22
|
0
|
|
|
|
|
|
$mm->sharedir('share'); |
23
|
0
|
|
|
|
|
|
$mm->archdir(0); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
my $mm = FFI::Build::MM->new; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $command = shift @ARGV; |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
if(defined $command) |
31
|
|
|
|
|
|
|
{ |
32
|
0
|
0
|
|
|
|
|
if($command eq 'build') |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
33
|
|
|
|
|
|
|
{ |
34
|
0
|
|
|
|
|
|
my $build = $mm->build; |
35
|
0
|
0
|
|
|
|
|
$build->build if $build; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
elsif($command eq 'test') |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
|
|
|
my $build = $mm->test; |
40
|
0
|
0
|
|
|
|
|
$build->build if $build; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
elsif($command eq 'clean') |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
|
|
|
$mm->clean; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
elsif($command eq 'all') |
47
|
|
|
|
|
|
|
{ |
48
|
0
|
|
|
|
|
|
my $build = $mm->build; |
49
|
0
|
0
|
|
|
|
|
$build->build if $build; |
50
|
0
|
|
|
|
|
|
undef $mm; |
51
|
0
|
|
|
|
|
|
$mm = FFI::Build::MM->new; |
52
|
0
|
|
|
|
|
|
$build = $mm->test; |
53
|
0
|
0
|
|
|
|
|
$build->build if $build; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else |
56
|
|
|
|
|
|
|
{ |
57
|
0
|
|
|
|
|
|
die "unknown command: $command"; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
0; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |