Subject: | Packing JQuery script fails |
Hi Merten,
I'm using your packer with the Jquery library. The following errors are
being reported when packing one of the files (see attached):
Backslash found where operator expected at (eval 4) line 1, near
"q/\/^(https?|ftp):\\\/\\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\q/
\"
String found where operator expected at (eval 4) line 1, at end of line
(Missing operator before
'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\q/
\/^(https?|ftp):\\\/\\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'?)
Backslash found where operator expected at (eval 4) line 1, near "\"
(Missing operator before \?)
Backslash found where operator expected at (eval 4) line 1, near ")\"
(Missing operator before \?)
Backslash found where operator expected at (eval 4) line 1, near "*\\"
(Missing operator before \?)
I'm using perl v5.8.8. I've attached a test script and the input file
which you can use to try to replicate the above errors.
Thanks,
William
--
Knowmad Technologies
http://www.knowmad.com
Subject: | jquery.validate.js.snpt |
Message body not shown because it is not plain text.
Subject: | packer.t |
use JavaScript::Packer;
my $file = 'jquery.validate.js.snpt';
die 'file not found' unless -e $file;
open (DATA, $file) or die "died while reading $file; $!";
my $javascript = do { local $/, <DATA> };
close DATA;
my $packed = $javascript;
JavaScript::Packer::minify( \$packed, {
compress => "shrink",
});
#print $packed;
print "Done!\n";