NAME

JavaScript::Packer - Perl version of Dean Edwards' Packer.js

VERSION

Version 0.01_02

SYNOPSIS

A JavaScript Compressor

This module does exactly the same as Dean Edwards' Packer.js

Take a look at http://dean.edwards.name/packer/

use JavaScript::Packer;

JavaScript::Packer::minify( $javascript, $opts );

First argument must be a scalarref of JavaScript-Code. Second argument must be a hashref of options. Possible options are

compress

Defines compression level. Possible values are 'clean', 'shrink', 'obfuscate' and 'best'. Default value is 'clean'. 'best' uses 'shrink' or 'obfuscate' depending on which result is shorter. This is because short scripts will grow if compression level is 'obfuscate'.

For backward compatibility 'minify' and 'base62' will still work.

You can add a copyright notice on top of the script. The copyright notice will only be added if the compression value is 'clean'.

AUTHOR

Merten Falk, <nevesenin at cpan.org>

BUGS

Please report any bugs or feature requests to bug-javascript-packer at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=JavaScript-Packer. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc JavaScript::Packer

COPYRIGHT & LICENSE

Copyright 2009 Merten Falk, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.