File Coverage

blib/lib/Template/Liquid/Tag/Continue.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 18 19 94.7


line stmt bran cond sub pod time code
1             package Template::Liquid::Tag::Continue;
2             our $VERSION = '1.0.23';
3 25     25   186 use strict;
  25         51  
  25         743  
4 25     25   134 use warnings;
  25         67  
  25         908  
5             require Template::Liquid::Error;
6             require Template::Liquid::Utility;
7 25     25   191 use base 'Template::Liquid::Tag::Break';
  25         57  
  25         3625  
8 25     25   86 sub import { Template::Liquid::register_tag('continue') }
9              
10             sub render {
11 21     21 0 30 my $s = shift;
12 21         36 $s->{template}->{continue} = 1;
13 21         42 return '';
14             }
15             1;
16              
17             =pod
18              
19             =encoding UTF-8
20              
21             =begin stopwords
22              
23             Lütke jadedPixel
24              
25             =end stopwords
26              
27             =head1 NAME
28              
29             Template::Liquid::Tag::Continue - For-block jitter construct
30              
31             =head1 Synopsis
32              
33             {% for item in collection %}
34             {% if item.other_condition %}
35             {% continue %}
36             {% endif %}
37             {% endfor %}
38              
39             =head1 Description
40              
41             You can use the C<{% continue %}> tag to fall through the current iteration of
42             the enclosing C<for|Template::Liquid::Tag::For> block.
43              
44             =head1 See Also
45              
46             Liquid for Designers: http://wiki.github.com/tobi/liquid/liquid-for-designers
47              
48             L<Template::Liquid|Template::Liquid/"Create your own filters">'s docs on custom
49             filter creation
50              
51             =head1 Author
52              
53             Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
54              
55             The original Liquid template system was developed by jadedPixel
56             (http://jadedpixel.com/) and Tobias Lütke (http://blog.leetsoft.com/).
57              
58             =head1 License and Legal
59              
60             Copyright (C) 2009-2022 by Sanko Robinson E<lt>sanko@cpan.orgE<gt>
61              
62             This program is free software; you can redistribute it and/or modify it under
63             the terms of The Artistic License 2.0. See the F<LICENSE> file included with
64             this distribution or http://www.perlfoundation.org/artistic_license_2_0. For
65             clarification, see http://www.perlfoundation.org/artistic_2_0_notes.
66              
67             When separated from the distribution, all original POD documentation is covered
68             by the Creative Commons Attribution-Share Alike 3.0 License. See
69             http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For clarification,
70             see http://creativecommons.org/licenses/by-sa/3.0/us/.
71              
72             =cut