File Coverage

blib/lib/Template/Plugin/CSS/LESSp.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1             package Template::Plugin::CSS::LESSp;
2             {
3             $Template::Plugin::CSS::LESSp::VERSION = '0.03';
4             }
5              
6 2     2   117687 use strict;
  2         5  
  2         78  
7 2     2   12 use warnings;
  2         2  
  2         65  
8 2     2   1785 use CSS::LESSp;
  2         11942  
  2         159  
9              
10 2     2   22 use base 'Template::Plugin::Filter';
  2         6  
  2         1816  
11              
12             =head1 NAME
13              
14             Template::Plugin::CSS::LESSp - Filter your CSS with CSS::LESSp
15              
16             =head1 SYNOPSIS
17              
18             [% USE CSS::LESSp %]
19             [% FILTER CSS::LESSp %]
20             your CSS with LESS extentions (variables, mixins, nested rules, operations)
21             [% END %]
22              
23             This filter is useful when you want to write less css ;-)
24              
25             See L and L for more information.
26              
27             =cut
28              
29             sub init {
30 2     2 0 151049 my ($self) = @_;
31 2         17 $self->install_filter('CSS::LESSp');
32 2         109 return $self;
33             }
34              
35             sub filter {
36 1     1 0 74 my ($self, $text) = @_;
37 1         6 return join( '', CSS::LESSp->parse($text) );
38             }
39              
40             =head1 AUTHOR
41              
42             Michael Langner, C<< >>
43              
44             =head1 BUGS
45              
46             Please report any bugs or feature requests to
47             C,
48             or through the web interface at
49             L.
50             I will be notified, and then you'll automatically be notified of progress on
51             your bug as I make changes.
52              
53             =head1 COPYRIGHT & LICENSE
54              
55             Copyright 2014 Michael Langner, all rights reserved.
56              
57             This program is free software; you can redistribute it and/or modify it under the
58             same terms as Perl itself.
59              
60             =cut
61              
62             1; # track-id: 3a59124cfcc7ce26274174c962094a20