line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#============================================================= -*-Perl-*- |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Template::Plugin::Iterator |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# DESCRIPTION |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Plugin to create a Template::Iterator from a list of items and optional |
8
|
|
|
|
|
|
|
# configuration parameters. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# AUTHOR |
11
|
|
|
|
|
|
|
# Andy Wardley |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# COPYRIGHT |
14
|
|
|
|
|
|
|
# Copyright (C) 2000-2007 Andy Wardley. All Rights Reserved. |
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
# This module is free software; you can redistribute it and/or |
17
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
#============================================================================ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Template::Plugin::Iterator; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
24
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
25
|
1
|
|
|
1
|
|
3
|
use base 'Template::Plugin'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
292
|
|
26
|
1
|
|
|
1
|
|
5
|
use Template::Iterator; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
50
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION = 2.68; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#------------------------------------------------------------------------ |
31
|
|
|
|
|
|
|
# new($context, \@data, \%args) |
32
|
|
|
|
|
|
|
#------------------------------------------------------------------------ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new { |
35
|
1
|
|
|
1
|
1
|
1
|
my $class = shift; |
36
|
1
|
|
|
|
|
1
|
my $context = shift; |
37
|
1
|
|
|
|
|
2
|
Template::Iterator->new(@_); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |