line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::Babelfish::Phrase::Node; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Babelfish AST abstract node. |
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
153083
|
use utf8; |
|
5
|
|
|
|
|
36
|
|
|
5
|
|
|
|
|
32
|
|
6
|
5
|
|
|
5
|
|
153
|
use strict; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
101
|
|
7
|
5
|
|
|
5
|
|
24
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
165
|
|
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
25
|
use parent qw( Class::Accessor::Fast ); |
|
5
|
|
|
|
|
27
|
|
|
5
|
|
|
|
|
44
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '2.10'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
183
|
|
|
183
|
1
|
9093
|
my ( $class, %args ) = @_; |
16
|
183
|
|
|
|
|
1070
|
return bless { %args }, $class; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub to_perl_escaped_str { |
21
|
82
|
|
|
82
|
1
|
2466
|
my ( $self, $str ) = @_; |
22
|
|
|
|
|
|
|
|
23
|
82
|
|
|
|
|
160
|
$str =~ s/\\/\\\\/g; |
24
|
82
|
|
|
|
|
123
|
$str =~ s/'/\\'/g; |
25
|
82
|
|
|
|
|
405
|
return "'$str'"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Locale::Babelfish::Phrase::Node - Babelfish AST abstract node. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 2.10 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 METHODS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 new |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
$class->new( %args ) |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Instantiates AST node. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 to_perl_escaped_str |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
$str = $node->to_perl_escaped_str |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Returns node string to be used in Perl source code. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHORS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=over 4 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item * |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Akzhan Abdulin <akzhan@cpan.org> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Igor Mironov <grif@cpan.org> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item * |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Victor Efimov <efimov@reg.ru> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
REG.RU LLC |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Kirill Sysoev <k.sysoev@me.com> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Alexandr Tkach <tkach@reg.ru> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by REG.RU LLC. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software, licensed under: |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The MIT (X11) License |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |