| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::Auto::Templates; |
|
2
|
2
|
|
|
2
|
|
9
|
use base qw/Template::Provider/; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
153
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
45
|
|
|
5
|
2
|
|
|
2
|
|
6
|
use strict; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
33
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
7
|
use File::Basename; |
|
|
2
|
|
|
|
|
1
|
|
|
|
2
|
|
|
|
|
390
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
HTML::Auto::Templates - this module stores HTML::Auto templates |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Version 0.07 |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $templates = { |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
'matrix' => <<'EOT' |
|
24
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
| |
|
112
|
|
|
|
|
|
|
[% FOREACH i IN cols %] |
|
113
|
|
|
|
|
|
|
| [% i -%] |
|
114
|
|
|
|
|
|
|
[% END %] |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
[% i_c = 0 %] |
|
117
|
|
|
|
|
|
|
[% FOREACH i IN vals %] |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
| [% lines.shift -%] |
|
120
|
|
|
|
|
|
|
[% j_c = 0 %] |
|
121
|
|
|
|
|
|
|
[% FOREACH j IN i %] |
|
122
|
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
[% class = "" %] |
|
124
|
|
|
|
|
|
|
[% IF diagonal AND i_c == j_c %] |
|
125
|
|
|
|
|
|
|
[% class = "mid" %] |
|
126
|
|
|
|
|
|
|
[% END %] |
|
127
|
|
|
|
|
|
|
[% IF more.$i_c.$j_c %] |
|
128
|
|
|
|
|
|
|
[% class = "more_info " _ class %] |
|
129
|
|
|
|
|
|
|
[% END %] |
|
130
|
|
|
|
|
|
|
[% IF attrs.$i_c.$j_c.class %] |
|
131
|
|
|
|
|
|
|
[% class = class _ " " _ attrs.$i_c.$j_c.class %] |
|
132
|
|
|
|
|
|
|
[% END %] |
|
133
|
|
|
|
|
|
|
[% attrs.$i_c.$j_c.delete('class') %] |
|
134
|
|
|
|
|
|
|
[% IF class.length != 0 %] |
|
135
|
|
|
|
|
|
|
class="[% class %]" |
|
136
|
|
|
|
|
|
|
[% END %] |
|
137
|
|
|
|
|
|
|
[% FOREACH att IN attrs.$i_c.$j_c.keys %] |
|
138
|
|
|
|
|
|
|
[% att %]="[% attrs.$i_c.$j_c.$att %]" |
|
139
|
|
|
|
|
|
|
[% END %] |
|
140
|
|
|
|
|
|
|
>[% IF myformat %][% j | format(myformat) %][% ELSE %][% j %][% END %] |
|
141
|
|
|
|
|
|
|
[% IF more.$i_c.$j_c %] |
|
142
|
|
|
|
|
|
|
[% more.$i_c.$j_c %] |
|
143
|
|
|
|
|
|
|
[% END %] |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
[% j_c = j_c + 1 %] |
|
146
|
|
|
|
|
|
|
[% END %] |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
[% i_c = i_c + 1 %] |
|
149
|
|
|
|
|
|
|
[% END %] |
|
150
|
|
|
|
|
|
|
| |
|
151
|
|
|
|
|
|
|
EOT |
|
152
|
|
|
|
|
|
|
, |
|
153
|
|
|
|
|
|
|
'h' => <<'EOT' |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
[% FOREACH i IN list %] |
|
156
|
|
|
|
|
|
|
[% i %] |
|
157
|
|
|
|
|
|
|
[% END %] |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
EOT |
|
161
|
|
|
|
|
|
|
, |
|
162
|
|
|
|
|
|
|
'v' => <<'EOT' |
|
163
|
|
|
|
|
|
|
[% FOREACH i IN list %] |
|
164
|
|
|
|
|
|
|
[% i %] |
|
165
|
|
|
|
|
|
|
[% END %] |
|
166
|
|
|
|
|
|
|
EOT |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
}; |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head2 _template_modified |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
TODO |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=cut |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub _template_modified { |
|
177
|
10
|
|
|
10
|
|
89235
|
my($self,$path) = @_; |
|
178
|
|
|
|
|
|
|
|
|
179
|
10
|
|
|
|
|
20
|
return 1; |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 _template_content |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
TODO |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=cut |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub _template_content { |
|
189
|
5
|
|
|
5
|
|
25
|
my ($self, $path) = @_; |
|
190
|
|
|
|
|
|
|
|
|
191
|
5
|
|
|
|
|
213
|
$path = basename($path);; |
|
192
|
5
|
50
|
|
|
|
18
|
$self->debug("get $path") if $self->{DEBUG}; |
|
193
|
|
|
|
|
|
|
|
|
194
|
5
|
|
|
|
|
9
|
my $data = $templates->{$path}; |
|
195
|
5
|
|
|
|
|
13
|
my $error = "error: $path not found"; |
|
196
|
5
|
|
|
|
|
6
|
my $mod_date = 1; |
|
197
|
|
|
|
|
|
|
|
|
198
|
5
|
|
|
|
|
13
|
return $data; |
|
199
|
|
|
|
|
|
|
} |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head1 AUTHOR |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
Nuno Carvalho, C<< >> |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=head1 BUGS |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
|
209
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
210
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=head1 SUPPORT |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
perldoc HTML::Auto |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
You can also look for information at: |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=over 4 |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
L |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
L |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
L |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item * Search CPAN |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
L |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=back |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
Copyright 2012 Project Natura. |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
253
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
254
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=cut |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
1; # End of HTML::Auto |