zoffixznet / JavaScript-Minifier

JavaScript::Minifier perl module
9 stars 6 forks source link

Docs out of step with code #4

Closed davorg closed 9 years ago

davorg commented 9 years ago

The synopsis for this module says that you use it like this:

use JavaScript::Minifier qw(minify);

But in the actual code, we have this:

our @EXPORT = qw(minify);

Which means that you'll get the minify() subroutine exported if you just use the module. You don't have to explicitly request the export.

I suggest that you either change the synopsis to say:

use JavaScript::Minifier;

Or change the code to use @EXPORT_OK rather than @EXPORT.

our @EXPORT_OK = qw(minify);

If it helps, I discovered this discrepancy while answering this question on SO - http://stackoverflow.com/questions/27391659/avoiding-collisions-with-modules-with-same-method-names/27398939

zoffixznet commented 9 years ago

Fixed and shipped to CPAN. Thanks all.