line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Chimps::Smoker::Source; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
24
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
148
|
|
4
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
154
|
|
5
|
4
|
|
|
4
|
|
25
|
use base qw/Class::Accessor/; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
7464
|
|
6
|
4
|
|
|
4
|
|
14112
|
use Scalar::Util qw(weaken); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
2065
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors(qw/config smoker/); |
9
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/directory cloned/); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
0
|
|
|
0
|
1
|
|
my $proto = shift; |
13
|
0
|
|
|
|
|
|
my %args = @_; |
14
|
0
|
0
|
|
|
|
|
my $type = delete $args{'type'} or die "No type of a source repository"; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
17
|
0
|
|
|
|
|
|
$class =~ s/[^:]*$/$type/; |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
eval "require $class; 1" or die "Couldn't load $class: $@"; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $obj = bless { %args }, $class; |
22
|
0
|
|
|
|
|
|
weaken $obj->{'smoker'}; |
23
|
0
|
|
|
|
|
|
return $obj->_init; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
|
|
sub _init { return $_[0] } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
0
|
|
sub clone { return 1 } |
29
|
0
|
|
|
0
|
0
|
|
sub checkout { return 1 } |
30
|
0
|
|
|
0
|
0
|
|
sub clean { return 1 } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
0
|
|
sub next { return () } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub run_cmd { |
35
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
36
|
0
|
|
|
|
|
|
my @args = @_; |
37
|
0
|
0
|
|
|
|
|
system(@args) == 0 |
38
|
|
|
|
|
|
|
or die "Couldn't run `". join(' ', @args ) ."`: $!"; |
39
|
0
|
|
|
|
|
|
return 1; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |