line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Vctools;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
49220
|
use strict;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
48
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
31
|
use 5.010;
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
61
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use File::Spec;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
752
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter;
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter);
|
12
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => [ qw(get_difftool get_mpath) ] );
|
13
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
14
|
|
|
|
|
|
|
our @EXPORT = qw();
|
15
|
|
|
|
|
|
|
our $VERSION = '0.09';
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# =============================================================================================
|
18
|
|
|
|
|
|
|
# This module is basically empty, its main purpose in life is to assemble all the different
|
19
|
|
|
|
|
|
|
# Vctool programs ('vc_status.pl', 'vc_checkout.pl', 'vc_apply.pl', etc...) all together
|
20
|
|
|
|
|
|
|
# in a nice CPAN-enabled package.
|
21
|
|
|
|
|
|
|
#
|
22
|
|
|
|
|
|
|
# But in addition to assembling the different Vctool programs, this file also...
|
23
|
|
|
|
|
|
|
# - holds the actual version number of File::Vctools (our $VERSION)
|
24
|
|
|
|
|
|
|
# - sets the minimum perl version to 5.10
|
25
|
|
|
|
|
|
|
# - contains the POD documentation (in English) -- although there also exist documentations
|
26
|
|
|
|
|
|
|
# in French (see 'Vctools_fr.pod') and in German (see 'Vctools_de.pod')
|
27
|
|
|
|
|
|
|
# - exports two utility functions: 'get_difftool()' and 'get_mpath()'
|
28
|
|
|
|
|
|
|
# =============================================================================================
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# probe 'diffnew.pl' in @INC and store the resulting full-path name in $difftool
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $difftool;
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
for (@INC) {
|
35
|
|
|
|
|
|
|
my @dirs = File::Spec->splitdir($_);
|
36
|
|
|
|
|
|
|
my $probetool = File::Spec->catdir(@dirs, 'Algorithm', 'diffnew.pl');
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
if (-f $probetool) {
|
39
|
|
|
|
|
|
|
$difftool = $probetool;
|
40
|
|
|
|
|
|
|
last;
|
41
|
|
|
|
|
|
|
}
|
42
|
|
|
|
|
|
|
}
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# probe 'vc_status.pl' in @INC and store the directory in $mpath
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $mpath;
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
for (@INC) {
|
49
|
|
|
|
|
|
|
my @dirs = File::Spec->splitdir($_);
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
if (@dirs > 1 and $dirs[-1] eq 'lib') {
|
52
|
|
|
|
|
|
|
my $probe = 'vc_status.pl';
|
53
|
|
|
|
|
|
|
my $path_script = File::Spec->catdir(@dirs[0..$#dirs - 1], 'script');
|
54
|
|
|
|
|
|
|
my $path_bin = File::Spec->catdir(@dirs[0..$#dirs - 1], 'bin');
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
if (-f File::Spec->catdir($path_script, $probe)) {
|
57
|
|
|
|
|
|
|
$mpath = $path_script;
|
58
|
|
|
|
|
|
|
last;
|
59
|
|
|
|
|
|
|
}
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
if (-f File::Spec->catdir($path_bin, $probe)) {
|
62
|
|
|
|
|
|
|
$mpath = $path_bin;
|
63
|
|
|
|
|
|
|
last;
|
64
|
|
|
|
|
|
|
}
|
65
|
|
|
|
|
|
|
}
|
66
|
|
|
|
|
|
|
}
|
67
|
|
|
|
|
|
|
|
68
|
1
|
|
|
1
|
0
|
21
|
sub get_difftool { $difftool; }
|
69
|
1
|
|
|
1
|
0
|
4929
|
sub get_mpath { $mpath; }
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1;
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__
|