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