perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: RFC: Apache2::Filter::Minifier::JavaScript
Date Thu, 20 Sep 2007 17:54:23 GMT

Graham TerMarsch wrote:
> On Thursday 20 September 2007 6:45 am, Geoffrey Young wrote:
>> Graham TerMarsch wrote:
>>> I've been working on some projects needing JS minification recently and
>>> wanted to ping others and find out if anyone else would find it useful to
>>> have a mod_perl2 filter that auto-minified your JS (using
>>> JavaScript::Minifier)...
>> see also
> I'd seen HTML::Clean before, and had considered making a separate minifier 
> module along those lines.  I actually hadn't seen that version of it, though; 
> I missed the dev releases.
> Thanks for the pointer though Geoff, I'll have a look at the latest 
> Apache::Clean release and see what useful tidbits of info are in there that 
> I've missed.

the parts you'll be interested in are the parts you were asking about,
like only running for a specific content-type.  it also has a basic
framework for using the streaming filter API and dealing with filter
context, as well as handling http compliance (removing the
content-length header, for example).  in all, you ought to be able to
use the base of it and swap the HTML::Clean innards for the purifier of
your choice.

good luck.


View raw message