Skip Menu |

This queue is for tickets about the CGI-Inspect CPAN distribution.

Report information
The Basics
Id: 47354
Status: open
Priority: 0/
Queue: CGI-Inspect

People
Owner: awwaiid [...] thelackthereof.org
Requestors: FERRENCY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.4
Fixed in: (no value)



Subject: CGI::Inspect perl and JS bugs
Hello. Your YAPC talk on CGI::Inspect was kickass, and now I'm trying to put the module into use. I've come across two problems so far. After an ordinary CPAN install, when I ran inspect() and connected to the continuity server, I got: Not a SCALAR reference at /usr/local/lib/perl5/site_perl/5.8.8/CGI/Inspect/Plugin/CallStack.pm line 53. This is in sub print_lexicals: 52 foreach my $var (sort keys %$lexicals) { 53 my $val = Dumper(${ $lexicals->{$var} }); 54 $val = escapeHTML($val); I was able to fix this error by simply removing the scalar dereference, but I'm not sure what it might have broken: 53 my $val = Dumper( $lexicals->{$var} ); This allowed me to inspect(), but the resulting page was not Super Pretty the way it was in your demo. It seemed like I wasn't getting the javascript I expected. I looked at the JS console and saw these two errors: Error: syntax error Source File: http://<snip>.com:8080/js/jquery.ui.all.js Line: 133, Column: 37 Source Code: ._pos){$.datepicker._pos=$.datepicker. Error: $(this).dialog is not a function Source File: http://<snip>.com:8080/mon.js Line: 17 It would be great to get this all going. My stats: FreeBSD 6 Embedded Perl version v5.8.8 for Apache/1.3.41 (Unix) mod_perl/1.31 Firefox 3.0.10 The "automtically open your inspection window via JS" didn't work, but I'm not too concerned about that. Thanks for the great module! Alan
Greetings Alan! I need to upload my latest version to CPAN, which might fix these bugs. I'll let you know here when that is uploaded (later tonight or tomorrow at the latest). I'll also do a clean install in a virtual machine to see that I have the install set up correctly. --Brock
CC: FERRENCY [...] cpan.org
Subject: Re: [rt.cpan.org #47354] CGI::Inspect perl and JS bugs
Date: Fri, 26 Jun 2009 13:24:16 -0400 (EDT)
To: Brock Wilcox via RT <bug-CGI-Inspect [...] rt.cpan.org>
From: alan [...] ferrency.com
Hey there, Thanks. I've been trying to clear up the js issues to do a crowd demo today, but it's not getting anywhere. Basically I'm running into a few issues: - There seem to be many syntax errors in the jquery.ui.all.js file, caused by removal of newlines and other white space (compression) - If I uncompress or use a fresh copy, my browser is only getting the first 128k of the jquery.ui.all.js file. If I telnet to port 8080 directly, I get the whole file, but Firefox is only seeing 128k of it when I either view source or get page info about the .js. I have no clue why this is happening, maybe it's not issuing a content length header? I had hoped to drop you a patch, but I'm a bit stuck at this point. Are you using Firefox? Thanks, Alan On Thu, 25 Jun 2009, Brock Wilcox via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47354 > > > Greetings Alan! > > I need to upload my latest version to CPAN, which might fix these bugs. > I'll let you know here when that is uploaded (later tonight or tomorrow > at the latest). I'll also do a clean install in a virtual machine to see > that I have the install set up correctly. > > --Brock >
On Fri Jun 26 13:24:42 2009, alan@ferrency.com wrote: Show quoted text
> Thanks. I've been trying to clear up the js issues to do a crowd demo > today, but it's not getting anywhere. > > Basically I'm running into a few issues: > > - There seem to be many syntax errors in the jquery.ui.all.js file, > caused by removal of newlines and other white space (compression) > > - If I uncompress or use a fresh copy, my browser is only getting the > first 128k of the jquery.ui.all.js file. If I telnet to port 8080 > directly, I get the whole file, but Firefox is only seeing 128k of it > when I either view source or get page info about the .js. > > I have no clue why this is happening, maybe it's not issuing a content > length header? > > I had hoped to drop you a patch, but I'm a bit stuck at this point. > > Are you using Firefox?
Hmm. Yes, I'm using Firefox. Well first off we need to get synced -- I've just now uploaded version 0.5 to CPAN, you can get it even faster at http://thelackthereof.org/projects/perl/CGI-Inspect/ (look for the .tar.gz). Give that a try and then we'll go from there. --Brock
CC: FERRENCY [...] cpan.org
Subject: Re: [rt.cpan.org #47354] CGI::Inspect perl and JS bugs
Date: Fri, 26 Jun 2009 16:45:14 -0400 (EDT)
To: Brock Wilcox via RT <bug-CGI-Inspect [...] rt.cpan.org>
From: alan [...] ferrency.com
Hello again. I updated to 0.5. This version is better, but still not perfect yet: the Perl problem I had seems resolved, but the weird javascript issues persist. The first error on the JS console is: Error: syntax error Source File: http://<snip>:8080/js/jquery.ui.all.js Line: 133, Column: 37 Source Code: ._pos){$.datepicker._pos=$.datepicker. The Javascript problem is the same: When I load http://<snip>:8080/js/jquery.ui.all.js in the browser, it is truncated right where that error is, and it says the document is 128kb. If I telnet to the port, and get the js file directly, I receive the entire file, but for some reason Firefox is truncating it at 128kb. (The second JS error is a direct result of only receiving a part of the .js file.) I'm using Firefox 3.01 on FreeBSD 6-something. Also, I snipped my hostname above, but I am not running apache on localhost. So, the inline javascript link isn't working, but the hint dropped in the error log is correct. I can't see how that would make a difference, but I thought I'd mention it. The last problem I'm having seems likely to be related to running in a mod_perl environment. After I click exit() on the CGI::Inspect window, the window closes, and the page finishes loading. However, the Continuity server doesn't seem to shut down or stop listening on port 8080. When I go back to a page which calls inspect(), HTTP::Daemon complains that the port is still in use: HTTP::Daemon: Address already in use at /usr/local/lib/perl5/site_perl/5.8.8/Continuity/Adapt/HttpDaemon.pm line 92. I expect your exit handler may need to do some more explicit resource deallocation? Thanks, Alan On Fri, 26 Jun 2009, Brock Wilcox via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=47354 > > > On Fri Jun 26 13:24:42 2009, alan@ferrency.com wrote:
>> Thanks. I've been trying to clear up the js issues to do a crowd demo >> today, but it's not getting anywhere. >> >> Basically I'm running into a few issues: >> >> - There seem to be many syntax errors in the jquery.ui.all.js file, >> caused by removal of newlines and other white space (compression) >> >> - If I uncompress or use a fresh copy, my browser is only getting the >> first 128k of the jquery.ui.all.js file. If I telnet to port 8080 >> directly, I get the whole file, but Firefox is only seeing 128k of it >> when I either view source or get page info about the .js. >> >> I have no clue why this is happening, maybe it's not issuing a content >> length header? >> >> I had hoped to drop you a patch, but I'm a bit stuck at this point. >> >> Are you using Firefox?
> > Hmm. Yes, I'm using Firefox. Well first off we need to get synced -- > I've just now uploaded version 0.5 to CPAN, you can get it even faster > at http://thelackthereof.org/projects/perl/CGI-Inspect/ (look for the > .tar.gz). > > Give that a try and then we'll go from there. > > --Brock > >
Subject: Re: [rt.cpan.org #47354] CGI::Inspect perl and JS bugs
Date: Fri, 26 Jun 2009 17:05:04 -0400 (EDT)
To: Brock Wilcox via RT <bug-CGI-Inspect [...] rt.cpan.org>
From: alan [...] ferrency.com
Regarding the "server doesn't shut down in mod_perl" issue, one potential problem is in Continuity. Here, you have a circular data structure. The server object contains a mapper, which contains the server object: $self->{mapper} = Continuity::Mapper->new( debug_level => $self->debug_level, debug_callback => sub { print "@_\n" }, callback => $self->{callback}, server => $self, %optional, ); } else { # Make sure that the provided mapper knows who we are $self->{mapper}->{server} = $self; } Even if your Continuity $server goes out of scope in Inspect.pm, neither the server nor the mapper will be destroyed because they both refer to each other. However, I tried explicitly deleting $server->{mapper} and $server->{adapter} in Inspect.pm and it didn't seem to make the server stop listening. Unfortunately I won't have much time to look at this over the weekend. Maybe you'll see something I missed? Thanks, Alan On Fri, 26 Jun 2009, alan@ferrency.com wrote: Show quoted text
> Hello again. > > I updated to 0.5. This version is better, but still not perfect yet: > the Perl problem I had seems resolved, but the weird javascript issues > persist. > > The first error on the JS console is: > Error: syntax error > Source File: http://<snip>:8080/js/jquery.ui.all.js > Line: 133, Column: 37 > Source Code: > ._pos){$.datepicker._pos=$.datepicker. > > The Javascript problem is the same: > > When I load http://<snip>:8080/js/jquery.ui.all.js in the browser, it > is truncated right where that error is, and it says the document is > 128kb. If I telnet to the port, and get the js file directly, I > receive the entire file, but for some reason Firefox is truncating it > at 128kb. > > (The second JS error is a direct result of only receiving a part of > the .js file.) > > I'm using Firefox 3.01 on FreeBSD 6-something. Also, I snipped my > hostname above, but I am not running apache on localhost. So, the > inline javascript link isn't working, but the hint dropped in the > error log is correct. I can't see how that would make a difference, > but I thought I'd mention it. > > > The last problem I'm having seems likely to be related to running in a > mod_perl environment. After I click exit() on the CGI::Inspect > window, the window closes, and the page finishes loading. However, > the Continuity server doesn't seem to shut down or stop listening on > port 8080. When I go back to a page which calls inspect(), > HTTP::Daemon complains that the port is still in use: > > HTTP::Daemon: Address already in use at > /usr/local/lib/perl5/site_perl/5.8.8/Continuity/Adapt/HttpDaemon.pm > line 92. > > I expect your exit handler may need to do some more explicit resource > deallocation? > > Thanks, > Alan > > > > > > On Fri, 26 Jun 2009, Brock Wilcox via RT wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=47354 > >> >> On Fri Jun 26 13:24:42 2009, alan@ferrency.com wrote:
>>> Thanks. I've been trying to clear up the js issues to do a crowd demo >>> today, but it's not getting anywhere. >>> >>> Basically I'm running into a few issues: >>> >>> - There seem to be many syntax errors in the jquery.ui.all.js file, >>> caused by removal of newlines and other white space (compression) >>> >>> - If I uncompress or use a fresh copy, my browser is only getting the >>> first 128k of the jquery.ui.all.js file. If I telnet to port 8080 >>> directly, I get the whole file, but Firefox is only seeing 128k of it >>> when I either view source or get page info about the .js. >>> >>> I have no clue why this is happening, maybe it's not issuing a content >>> length header? >>> >>> I had hoped to drop you a patch, but I'm a bit stuck at this point. >>> >>> Are you using Firefox?
>> >> Hmm. Yes, I'm using Firefox. Well first off we need to get synced -- >> I've just now uploaded version 0.5 to CPAN, you can get it even faster >> at http://thelackthereof.org/projects/perl/CGI-Inspect/ (look for the >> .tar.gz). >> >> Give that a try and then we'll go from there. >> >> --Brock >> >>
>
On Fri Jun 26 16:45:46 2009, alan@ferrency.com wrote: Show quoted text
> When I load http://<snip>:8080/js/jquery.ui.all.js in the browser, it > is truncated right where that error is, and it says the document is > 128kb. If I telnet to the port, and get the js file directly, I > receive the entire file, but for some reason Firefox is truncating it > at 128kb. > > (The second JS error is a direct result of only receiving a part of > the .js file.) > > I'm using Firefox 3.01 on FreeBSD 6-something. Also, I snipped my > hostname above, but I am not running apache on localhost. So, the > inline javascript link isn't working, but the hint dropped in the > error log is correct. I can't see how that would make a difference, > but I thought I'd mention it.
Ah! I now I recognize that as a Continuity problem, sending the partial data on FreeBSD (sometimes). I think this was fixed once but maybe I somehow triggerd it again. I'll install FreeBSD and see if I can reproduce it. Show quoted text
> The last problem I'm having seems likely to be related to running in a > mod_perl environment. After I click exit() on the CGI::Inspect > window, the window closes, and the page finishes loading. However, > the Continuity server doesn't seem to shut down or stop listening on > port 8080. When I go back to a page which calls inspect(), > HTTP::Daemon complains that the port is still in use:
I've never tried CGI::Inspect in mod_perl. I have a mod_perl install at work that I'll try it on, and see if I get the same results. I'm doing the ICFP contest this weekend, so I'm afraid it is unlikely for a fix to come before sometime next week, just so you know. --Brock