line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS::Version; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
my $PREFIX = 'VCS'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
0
|
|
|
0
|
1
|
|
my $container_classtype = shift; |
7
|
0
|
|
|
|
|
|
$container_classtype =~ s#^$PREFIX##; |
8
|
0
|
|
|
|
|
|
my ($hostname, $impl_class, $path, $query) = VCS->parse_url(@_); |
9
|
0
|
|
|
|
|
|
VCS->class_load($impl_class); |
10
|
0
|
|
|
|
|
|
my $this_class = "$impl_class$container_classtype"; |
11
|
0
|
|
|
|
|
|
return $this_class->new(@_); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
15
|
0
|
|
|
0
|
1
|
|
my ($class, $url) = @_; |
16
|
0
|
|
|
|
|
|
my ($hostname, $impl_class, $path, $query) = VCS->parse_url($url); |
17
|
0
|
|
|
|
|
|
my @path = split '/', $path; |
18
|
0
|
|
|
|
|
|
my $version = pop @path; |
19
|
0
|
|
|
|
|
|
my $filename = join '/', @path; |
20
|
0
|
|
|
|
|
|
my $self = { |
21
|
|
|
|
|
|
|
URL => $url, |
22
|
|
|
|
|
|
|
VERSION => $version, |
23
|
|
|
|
|
|
|
PATH => $filename, |
24
|
|
|
|
|
|
|
}; |
25
|
0
|
|
|
|
|
|
bless $self, $class; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub url { |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
$self->{URL}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub version { |
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
35
|
0
|
|
|
|
|
|
$self->{VERSION}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
0
|
1
|
|
sub tags { |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
0
|
1
|
|
sub text { |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
0
|
1
|
|
sub diff { |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
0
|
1
|
|
sub author { |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
0
|
1
|
|
sub date { |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
0
|
1
|
|
sub reason { |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub path { |
57
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
58
|
0
|
|
|
|
|
|
$self->{PATH}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |