"Joshua ben Jore" schreef:
> Adriano Ferreira:
>> Peter Michaux:

>>> I'm writing a new version of JavaScript::Minification on CPAN. This
>>> is my first CPAN module and first Perl project! If someone is
>>> willing to take a look to see if I've done something terribly wrong
>>> packaging the code I would greatly appreciate any feedback.
>>>
>>> Currently the new module is in a subversion repository. If you have
>>> subversion you should be able to check it out and test it with
>>>
>>> svn co http://dev.michaux.ca/svn/random/JavaScript-Minifier
>>> cd JavaScript-Minifier
>>> perl MakeFile.PL
>>> make test
>>
>> Some comments on packaging:
>> * it may be a good idea to add a LICENSE parameter to Makefile.PL
>> (supported by ExtUtils::MakeMaker >= 6.31)
>> * you might like to add POD and POD coverage tests (for CPANTS' sake)
>>
>> Some comments on code:
>> * it does not look like Perl code, but C code translated literally
>> to Perl.
>
> That's because this is a translation of the C program, jsmin.
> http://javascript.crockford.com/jsmin.html

The code contains the strange '\000'.

I see basically 3 steps:
1. respect strings
2. remove comments
3. compress everything else

See also Javascript::Squish.
http://search.cpan.org/perldoc?JavaScript::Squish

-- 
Affijn, Ruud

"Gewoon is een tijger."

Reply via email to