Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-ViewCode CPAN distribution.

Report information
The Basics
Id: 16645
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-ViewCode

People
Owner: wonko [...] cpan.org
Requestors: nekokak [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: wish:CAP::ViewCode
This is a very nice tool. I wish , Cannot you jump to the specified line? I want to use the function by CAP::DebugScreen. atsushi
From: markstos [...] cpan.org
[guest - Tue Dec 20 20:45:41 2005]: Show quoted text
> This is a very nice tool. > > I wish , > Cannot you jump to the specified line? > I want to use the function by CAP::DebugScreen. > > atsushi >
Good idea. Here's a code patch. It depends on line_no being turned on, and still needs documentation so people know the feature exists. --- old-CGI-Application-Plugin-ViewCode-1.00/lib/CGI/Application/Plugin/ViewCode.pm 2005-12-21 14:48:54.000000000 -0500 +++ new-CGI-Application-Plugin-ViewCode-1.00/lib/CGI/Application/Plugin/ViewCode.pm 2005-12-21 14:48:54.000000000 -0500 @@ -207,12 +207,12 @@ $formatter->set_format($style, [qq(<span class="$style">), qq(</span>)]); } @lines = $formatter->format_string(@lines); - + # if we want line numbers if( $options{line_no} ) { my $i = 1; @lines = map { - (qq(<span class="LineNumber">) . $i++ . qq(:</span>&nbsp;). $_) + (qq(<span class="LineNumber"><a name="$i">) . $i++ . qq(:</a></span>&nbsp;). $_) } @lines; }
[guest - Wed Dec 21 14:50:50 2005]: Show quoted text
> [guest - Tue Dec 20 20:45:41 2005]: >
> > This is a very nice tool. > > > > I wish , > > Cannot you jump to the specified line? > > I want to use the function by CAP::DebugScreen. > > > > atsushi > >
> > Good idea. Here's a code patch. It depends on line_no being turned on, > and still needs documentation so people know the feature exists.
I've done something fairly close to your patch (mostly because I couldn't get it to apply cleanly). It should be heading to CPAN fairly soon.