1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
#!/usr/bin/env perl
use strict;
use warnings;
use lib '../lib';
use HTML::Template;
my $tmpl = HTML::Template->new(filename => 'templates/long_loops.tmpl');
$tmpl->param(
propname => 'foo',
javascript => '<script type="text/javascript">aler("hi!")</script>',
hotel_key => 'bar&>?/',
alert => 'Danger!&!',
new_comment_button => '<input type="button" name="new_comment">Click Me!</input>',
comments => [
{
color => 'black',
posted_by => 'me & you',
posted_on => '<yesterday>',
stars => '10',
comment => 'Super & duper cool stuff!',
approval_button =>
'<input type="button" name="approve_comment">No, Click Me!</input>',
edit_button =>
'<input type="button" name="edit_comment">Hey, what about me!</input>',
delete_button =>
'<input type="button" name="delete_comment">Why am I always last?</input>',
},
{
color => 'blue',
posted_by => 'you & I',
posted_on => '2 days <ago>',
stars => '5',
comment => 'It is ok <really>',
approval_button =>
'<input type="button" name="approve_comment">No, Click Me!</input>',
edit_button =>
'<input type="button" name="edit_comment">Hey, what about me!</input>',
delete_button =>
'<input type="button" name="delete_comment">Why am I always last?</input>',
},
{
color => 'yellow',
posted_by => 'someone & someone else',
posted_on => '4 days <ago>',
stars => '4',
comment => 'It would not kill me to go back & spend more time there',
approval_button =>
'<input type="button" name="approve_comment">No, Click Me!</input>',
edit_button =>
'<input type="button" name="edit_comment">Hey, what about me!</input>',
delete_button =>
'<input type="button" name="delete_comment">Why am I always last?</input>',
},
{
color => 'blue',
posted_by => 'someone else!&!',
posted_on => '<4 days ago>',
stars => '6',
comment => 'I enjoyed the <bed>',
approval_button =>
'<input type="button" name="approve_comment">No, Click Me!</input>',
edit_button =>
'<input type="button" name="edit_comment">Hey, what about me!</input>',
delete_button =>
'<input type="button" name="delete_comment">Why am I always last?</input>',
},
{
color => 'red',
posted_by => 'someone else <&>',
stars => '6',
approval_button =>
'<input type="button" name="approve_comment">No, Click Me!</input>',
},
{},
],
comment_editor => [
{
color => 'black',
posted_by => 'me',
posted_on => 'yesterday',
stars => '10',
comment => 'Super duper cool stuff!',
ok_button =>
'<input type="button" name="ok">I am totally fine with that.</input>',
cancel_button =>
'<input type="button" name="cancel">No you are not.</input>',
},
{
color => 'blue',
posted_by => 'you',
posted_on => '2 days ago',
stars => '5',
comment => 'It is ok',
ok_button =>
'<input type="button" name="ok">I am totally fine with that.</input>',
cancel_button =>
'<input type="button" name="cancel">No you are not.</input>',
},
{
color => 'yellow',
posted_by => 'someone',
posted_on => '4 days ago',
stars => '4',
comment => 'It would not kill me to go back',
ok_button =>
'<input type="button" name="ok">I am totally fine with that.</input>',
cancel_button =>
'<input type="button" name="cancel">No you are not.</input>',
},
{
color => 'blue',
posted_by => 'someone else',
posted_on => '4 days ago',
stars => '6',
comment => 'I enjoyed the bed',
ok_button =>
'<input type="button" name="ok">I am totally fine with that.</input>',
cancel_button =>
'<input type="button" name="cancel">No you are not.</input>',
},
{
color => 'red',
posted_by => 'someone else',
stars => '6',
cancel_button =>
'<input type="button" name="cancel">No you are not.</input>',
},
{},
],
comment_created => [
{posted_by => 'Fred'},
{posted_by => 'George'},
{posted_by => 'Thomas'},
{posted_by => 'Dan'},
{posted_by => 'Henry'},
{posted_by => 'Michael'},
{posted_by => 'Nelson'},
{posted_by => 'Brad'},
{posted_by => 'Rodney'},
{posted_by => 'Jose'},
{posted_by => 'Marie'},
{posted_by => 'Eric'},
{posted_by => 'Isaac'},
{posted_by => 'Rusty'},
{posted_by => 'Jacob'},
{posted_by => 'Alice'},
{posted_by => 'Kelly'},
{posted_by => 'Juan'},
{posted_by => 'Lewis'},
{posted_by => 'Fredrick'},
{posted_by => 'Manny'},
{posted_by => 'Dee'},
{posted_by => 'Nort'},
{posted_by => 'Jeanne'},
{posted_by => 'Oscar'},
{posted_by => 'Peter'},
{posted_by => 'Russel'},
{posted_by => 'Steve'},
{posted_by => 'Timmy'},
{posted_by => 'Vance'},
{},
],
);
|