line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
47
|
|
2
|
|
|
|
|
|
|
package RosettaCode::Lang; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
525
|
use IO::All; |
|
1
|
|
|
|
|
11932
|
|
|
1
|
|
|
|
|
10
|
|
5
|
1
|
|
|
1
|
|
74
|
use Carp 'confess'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
47
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
465
|
use Mo qw'build default xxx'; |
|
1
|
|
|
|
|
548
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'RosettaCode'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub fetch_lang { |
12
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
13
|
0
|
|
|
|
|
|
my $file = io->file("Cache/Lang/$self->{path}")->utf8; |
14
|
0
|
0
|
0
|
|
|
|
if ($file->exists and time - $file->mtime < $self->CACHE_TIME) { |
15
|
0
|
|
|
|
|
|
$self->text($file->all); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
else { |
18
|
0
|
|
|
|
|
|
my $text = $self->get_text(":Category:$self->{name}"); |
19
|
0
|
|
|
|
|
|
$file->assert->print($text); |
20
|
0
|
|
|
|
|
|
$self->text($text); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# TODO Parse out meta information from Language description text. |
25
|
|
|
|
|
|
|
sub build_lang { |
26
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
27
|
0
|
|
|
|
|
|
$self->log("LANG $self->{name}"); |
28
|
0
|
|
|
|
|
|
$self->write_file( |
29
|
|
|
|
|
|
|
"Lang/$self->{path}/00-LANG.txt", |
30
|
|
|
|
|
|
|
$self->text, |
31
|
|
|
|
|
|
|
1, |
32
|
|
|
|
|
|
|
); |
33
|
0
|
|
|
|
|
|
$self->dump_file( |
34
|
|
|
|
|
|
|
"Lang/$self->{path}/00-META.yaml", |
35
|
|
|
|
|
|
|
{ |
36
|
|
|
|
|
|
|
from => "http://rosettacode.org/wiki/Category:$self->{url}", |
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
1, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |