blib/lib/Embperl/Syntax/MsgIdExtract.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 37 CC 2 SCAR 12.8
CC
2
Cov
0%
new
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1  
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2015 Gerald Richter
6 # Embperl - Copyright (c) 2015-2023 actevy.io
7 #
8 # You may distribute under the terms of either the GNU General Public
9 # License or the Artistic License, as specified in the Perl README file.
10 #
11 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
12 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
13 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 #
15 ###################################################################################
16
17  
18  
19 package Embperl::Syntax::MsgIdExtract ;
20  
21 use Embperl::Syntax (':types') ;
22  
23 use strict ;
24 use vars qw{@ISA %Blocks %BlocksOutput %BlocksOutputLink} ;
25  
26  
27  
28 @ISA = qw(Embperl::Syntax) ;
29  
30  
31 ###################################################################################
32 #
33 # Methods
34 #
35 ###################################################################################
36  
37 # ---------------------------------------------------------------------------------
38 #
39 # Create new Syntax Object
40 #
41 # ---------------------------------------------------------------------------------
42  
43 sub new
44  
45 {
46 my $self = shift ;
47  
48 $self = Embperl::Syntax::new ($self) ;
49  
50 if (!$self -> {-epbMsgIdExtract})
51 {
52 $self -> {-epbMsgIdExtract} = $self -> CloneHash (\%Blocks) ;
53  
54 $self -> AddToRoot ($self -> {-epbMsgIdExtract}) ;
55 }
56  
57 return $self ;
58 }
59  
60  
61  
62 %Blocks = (
63 '-lsearch' => 1,
64 'Embperl command escape' => {
65 'text' => '[[',
66 'nodename' => '[',
67 'nodetype' => ntypCDATA,
68 },
69 'Embperl comment' => {
70 'text' => '[#',
71 'end' => '#]',
72 # 'inside' => \%MetaComment,
73 'procinfo' => {
74 embperl => {
75 compilechilds => 0,
76 removenode => 3,
77 },
78 },
79 },
80 'Embperl output msg id' => {
81 'text' => '[=',
82 'end' => '=]',
83 'unescape' => 1,
84 removespaces => 72,
85 'procinfo' => {
86 embperl => {
87 perlcode =>
88 [
89 '$Embperl::Syntax::MsgIdExtract::Ids{%#\'0%} = q{} if (!exists ($Embperl::Syntax::MsgIdExtract::Ids{%#\'0%})) ;',
90 ],
91 removenode => 4,
92 compilechilds => 0,
93 }
94 },
95 },
96 'Embperl output msg id gettext' => {
97 'text' => 'gettext',
98 'end' => ')',
99 'unescape' => 1,
100 follow => {
101 'bracktes' =>
102 {
103 'text' => '(',
104 'end' => ')',
105 follow => {
106 'Quote ""' =>
107 {
108 'text' => '"',
109 'end' => '"',
110 removespaces => 72,
111 'procinfo' => {
112 embperl => {
113 perlcode =>
114 [
115 '$Embperl::Syntax::MsgIdExtract::Ids{%#\'0%} = q{} if (!exists ($Embperl::Syntax::MsgIdExtract::Ids{%#\'0%})) ;',
116 ],
117 removenode => 4,
118 compilechilds => 0,
119 }
120 },
121 },
122 'Quote \'\'' =>
123 {
124 'text' => '\'',
125 'end' => '\'',
126 removespaces => 72,
127 'procinfo' => {
128 embperl => {
129 perlcode =>
130 [
131 '$Embperl::Syntax::MsgIdExtract::Ids{%#\'0%} = q{} if (!exists ($Embperl::Syntax::MsgIdExtract::Ids{%#\'0%})) ;',
132 ],
133 removenode => 4,
134 compilechilds => 0,
135 }
136 },
137 },
138 },
139 },
140 },
141 },
142 ) ;
143
144  
145 1;
146  
147  
148 __END__