File Coverage

blib/lib/Template/Liquid/Tag/Decrement.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 6 7 85.7
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             our $VERSION = '1.0.22';
2             use strict;
3 24     24   174 use warnings;
  24         43  
  24         580  
4 24     24   105 require Template::Liquid::Error;
  24         51  
  24         707  
5             require Template::Liquid::Utility;
6             use base 'Template::Liquid::Tag::Increment';
7 24     24   105 #
  24         40  
  24         9088  
8 24     24   73 1;
9              
10 2     2   11 =pod
11 2     2   8  
12 0     0     =encoding UTF-8
13              
14             =begin stopwords
15              
16             Lütke jadedPixel
17              
18             =end stopwords
19              
20             =head1 NAME
21              
22             Template::Liquid::Tag::Decrement - Document-level Persistant Number
23              
24             =head1 Description
25              
26             Creates a new number variable, and decreases its value by one every time it is
27             called. The initial value is C<-1>.
28              
29             =head1 Synopsis
30              
31             {% decrement my_counter %}
32             {% decrement my_counter %}
33             {% decrement my_counter %}
34              
35             ...will result in...
36              
37             -1
38             -2
39             -3
40              
41             =head1 Notes
42              
43             Like C<increment>, variables declared inside C<decrement> are independent from
44             variables created through C<assign> or C<capture>.
45              
46             =head1 See Also
47              
48             Liquid for Designers: http://wiki.github.com/tobi/liquid/liquid-for-designers
49              
50             =head1 Author
51              
52             Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
53              
54             The original Liquid template system was developed by jadedPixel
55             (http://jadedpixel.com/) and Tobias Lütke (http://blog.leetsoft.com/).
56              
57             =head1 License and Legal
58              
59             Copyright (C) 2009-2022 by Sanko Robinson E<lt>sanko@cpan.orgE<gt>
60              
61             This program is free software; you can redistribute it and/or modify it under
62             the terms of The Artistic License 2.0. See the F<LICENSE> file included with
63             this distribution or http://www.perlfoundation.org/artistic_license_2_0. For
64             clarification, see http://www.perlfoundation.org/artistic_2_0_notes.
65              
66             When separated from the distribution, all original POD documentation is covered
67             by the Creative Commons Attribution-Share Alike 3.0 License. See
68             http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For clarification,
69             see http://creativecommons.org/licenses/by-sa/3.0/us/.
70              
71             =cut