line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1807
|
use VCS::Dir; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
7
|
use VCS::File; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
1116
|
use VCS::Version; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
6
|
1
|
|
|
1
|
|
4251
|
use URI; |
|
1
|
|
|
|
|
9180
|
|
|
1
|
|
|
|
|
289
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub parse_url { |
11
|
|
|
|
|
|
|
# vcs://hostname/classname/... |
12
|
3
|
|
|
3
|
1
|
675
|
my ($class, $url) = @_; |
13
|
3
|
|
|
|
|
15
|
my $uri = URI->new($url); |
14
|
3
|
50
|
|
|
|
19775
|
die "Non-vcs URL '$url' passed!\n" unless $uri->scheme eq 'vcs'; |
15
|
3
|
|
|
|
|
360
|
my $path = $uri->path; |
16
|
3
|
|
|
|
|
50
|
$path =~ s#^/([^/]+)##; |
17
|
3
|
|
|
|
|
7
|
my $classname = $1; |
18
|
3
|
|
|
|
|
19
|
($uri->authority, $classname, $path, $uri->query) |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _class2file { |
22
|
1
|
|
|
1
|
|
3
|
my $class = shift; |
23
|
1
|
|
|
|
|
5
|
$class =~ s#::#/#g; |
24
|
1
|
|
|
|
|
3
|
$class .= '.pm'; |
25
|
1
|
|
|
|
|
11
|
$class; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub class_load { |
29
|
1
|
|
|
1
|
1
|
3
|
my ($class, $to_load) = @_; |
30
|
1
|
|
|
|
|
6
|
require(_class2file($to_load)); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |