[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> ). $_)
+ (qq(<span class="LineNumber"><a name="$i">) . $i++ .
qq(:</a></span> ). $_)
} @lines;
}