Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the JavaScript-Packer CPAN distribution.

Report information
The Basics
Id: 65093
Status: resolved
Priority: 0/
Queue: JavaScript-Packer

People
Owner: Nobody in particular
Requestors: MBROOKS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.000
Fixed in: 1.001



Subject: RE: Minified variable names breaks script
String values passed to getElementsByTagName() are minified when a variable of the same name exists within scope of the Javascript function. The example below was achieved using *best* compression option. // before function initScript() { var config = parseXML("config.xml").getElementsByTagName("config"); ... } // after (minified/uncompressed) function initScript() { var r = parseXML("config.xml").getElementsByTagName("r"); ... }
Thanks for reporting that. I didn't read the Regexp::RegGrp doc. Muuuaaaaaahhh.... On Tue Jan 25 00:13:18 2011, MBROOKS wrote: Show quoted text
> String values passed to getElementsByTagName() are minified when a > variable of the same name exists within scope of the Javascript function. > > The example below was achieved using *best* compression option. > > // before > > function initScript() { > var config = parseXML("config.xml").getElementsByTagName("config"); > > ... > } > > // after (minified/uncompressed) > > function initScript() { > var r = parseXML("config.xml").getElementsByTagName("r"); > > ... > }
Subject: Re: [rt.cpan.org #65093] RE: Minified variable names breaks script
Date: Thu, 27 Jan 2011 01:17:48 -0800
To: bug-JavaScript-Packer [...] rt.cpan.org
From: "Marc S. Brooks" <marc [...] mbrooks.info>
It's all good. I just wanted to make sure this package was optimal before I totally abuse it minifying my Javascripts. :) On Thu, Jan 27, 2011 at 12:53 AM, Merten Falk via RT < bug-JavaScript-Packer@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=65093 > > > Thanks for reporting that. I didn't read the Regexp::RegGrp doc. > Muuuaaaaaahhh.... > > > On Tue Jan 25 00:13:18 2011, MBROOKS wrote:
> > String values passed to getElementsByTagName() are minified when a > > variable of the same name exists within scope of the Javascript function. > > > > The example below was achieved using *best* compression option. > > > > // before > > > > function initScript() { > > var config = parseXML("config.xml").getElementsByTagName("config"); > > > > ... > > } > > > > // after (minified/uncompressed) > > > > function initScript() { > > var r = parseXML("config.xml").getElementsByTagName("r"); > > > > ... > > }
> > >
-- Marc S. Brooks 13603 Marina Pointe Dr. #A623 1/2 Marina Del Rey, CA 90292