Apache2::Filter::CSS::LESS - Apache2 LESS to CSS conversion filter
<LocationMatch "\.less$"> PerlOutputFilterHandler Apache2::Filter::CSS::LESS # optionally, set the output content type. # default content type is text/css # PerlSetVar LessContentType "text/plain" </LocationMatch>
Apache2::Filter::CSS::LESS is a mod_perl2 output filter which converts CSS LESS files into CSS on demand using CSS::LESSp.
CSS::LESSp
Conversion of LESS files to CSS requires considerably more CPU resources than simply serving up static CSS files. Therefore, it is recommended that you use some sort of cache in order to minimize the processing required to convert LESS files. An example to cache everything under /less using mod_cache:
/less
mod_cache
# cache root directory CacheRoot /path/to/disk/cache # turn on cache for "/less/" location CacheEnable disk /less/
see the mod_cache documentation for more details.
The following PerlSetVar's are recognized:
PerlSetVar
Sets the output content type of the filtered CSS. The default content type is text/css.
text/css
You can contribute or fork this project via github:
http://github.com/mschout/apache2-filter-css-less
git clone git://github.com/mschout/apache2-filter-css-less.git
Please report any bugs or feature requests to bug-apache2-filter-css-less@rt.cpan.org, or through the web interface at http://rt.cpan.org/
Michael Schout <mschout@cpan.org>
Copyright 2009 Michael Schout.
This program is free software; you can redistribute it and/or modify it under the terms of either:
the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
the Artistic License version 2.0.
CSS::LESSp, Apache2
To install Apache2::Filter::CSS::LESS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::Filter::CSS::LESS
CPAN shell
perl -MCPAN -e shell install Apache2::Filter::CSS::LESS
For more information on module installation, please visit the detailed CPAN module installation guide.