| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Shipwright::Backend; |
|
2
|
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
1709
|
use warnings; |
|
|
6
|
|
|
|
|
8
|
|
|
|
6
|
|
|
|
|
192
|
|
|
4
|
6
|
|
|
6
|
|
26
|
use strict; |
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
162
|
|
|
5
|
6
|
|
|
6
|
|
2836
|
use UNIVERSAL::require; |
|
|
6
|
|
|
|
|
6270
|
|
|
|
6
|
|
|
|
|
53
|
|
|
6
|
6
|
|
|
6
|
|
139
|
use Shipwright::Util; |
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
1695
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
|
9
|
17
|
|
|
17
|
1
|
28241
|
my $class = shift; |
|
10
|
17
|
|
|
|
|
49
|
my %args = @_; |
|
11
|
|
|
|
|
|
|
|
|
12
|
17
|
100
|
|
|
|
55
|
confess_or_die 'need repository arg' unless exists $args{repository}; |
|
13
|
|
|
|
|
|
|
|
|
14
|
16
|
|
|
|
|
49
|
$args{repository} =~ s/^\s+//; |
|
15
|
16
|
|
|
|
|
35
|
$args{repository} =~ s/\s+$//; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# exception for svk repos, they can start with // |
|
18
|
16
|
100
|
|
|
|
51
|
if ( $args{repository} =~ m{^//} ) { |
|
19
|
1
|
|
|
|
|
5
|
$args{repository} = 'svk:'. $args{repository}; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
16
|
|
|
|
|
19
|
my $backend; |
|
23
|
16
|
100
|
|
|
|
72
|
if ( $args{repository} =~ /^([a-z]+)(?:\+([a-z]+))?:/ ) { |
|
24
|
12
|
|
|
|
|
33
|
($backend) = $1; |
|
25
|
|
|
|
|
|
|
} else { |
|
26
|
4
|
|
|
|
|
16
|
confess_or_die "invalid repository, doesn't start with xxx: or xxx+yyy:"; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
12
|
|
|
|
|
50
|
my $module = find_module(__PACKAGE__, $backend); |
|
30
|
12
|
50
|
|
|
|
39
|
unless ( $module ) { |
|
31
|
0
|
|
|
|
|
0
|
confess_or_die "Couldn't find backend implementing '$backend'"; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$module->require |
|
35
|
12
|
50
|
|
|
|
108
|
or confess_or_die "Couldn't load module '$module'" |
|
36
|
|
|
|
|
|
|
." implementing backend '$backend': $@"; |
|
37
|
12
|
|
|
|
|
338
|
return $module->new(%args); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |