line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::FileSet; |
2
|
5
|
|
|
5
|
|
1904
|
use Lingua::YaTeA::File; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
58
|
|
3
|
5
|
|
|
5
|
|
135
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
95
|
|
4
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1679
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new |
9
|
|
|
|
|
|
|
{ |
10
|
11
|
|
|
11
|
1
|
34
|
my ($class,$repository) = @_; |
11
|
11
|
|
|
|
|
37
|
my $this = {}; |
12
|
11
|
|
|
|
|
34
|
bless ($this,$class); |
13
|
11
|
|
|
|
|
47
|
$this->{REPOSITORY} = $repository; |
14
|
11
|
|
|
|
|
25
|
$this->{FILES} = (); |
15
|
11
|
|
|
|
|
39
|
return $this; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub checkRepositoryExists |
20
|
|
|
|
|
|
|
{ |
21
|
8
|
|
|
8
|
1
|
72
|
my ($this) = @_; |
22
|
8
|
50
|
|
|
|
22
|
if (! -d $this->getRepository) |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
|
|
0
|
die "No such repository :" . $this->getRepository . "\n"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else |
27
|
|
|
|
|
|
|
{ |
28
|
8
|
|
|
|
|
35
|
print STDERR "Data will be loaded from: ". $this->getRepository . "\n"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub addFile |
33
|
|
|
|
|
|
|
{ |
34
|
70
|
|
|
70
|
1
|
148
|
my ($this,$repository,$name) = @_; |
35
|
70
|
|
|
|
|
113
|
my $file; |
36
|
|
|
|
|
|
|
my $option; |
37
|
|
|
|
|
|
|
|
38
|
70
|
|
|
|
|
200
|
$file = Lingua::YaTeA::File->new($repository,$name); |
39
|
|
|
|
|
|
|
|
40
|
70
|
|
|
|
|
171
|
$this->{FILES}->{$file->getInternalName} = $file; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub getFile |
44
|
|
|
|
|
|
|
{ |
45
|
52
|
|
|
52
|
1
|
149
|
my ($this,$name) = @_; |
46
|
52
|
|
|
|
|
300
|
return $this->{FILES}->{$name}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub addFiles |
50
|
|
|
|
|
|
|
{ |
51
|
4
|
|
|
4
|
1
|
14
|
my ($this,$repository,$file_name_a) = @_; |
52
|
4
|
|
|
|
|
9
|
my $name; |
53
|
4
|
|
|
|
|
13
|
foreach $name (@$file_name_a) |
54
|
|
|
|
|
|
|
{ |
55
|
36
|
|
|
|
|
69
|
$this->addFile($repository,$name); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub getRepository |
60
|
|
|
|
|
|
|
{ |
61
|
24
|
|
|
24
|
1
|
47
|
my ($this) = @_; |
62
|
24
|
|
|
|
|
846
|
return $this->{REPOSITORY} ; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |