Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 13615
Status: resolved
Priority: 0/
Queue: Devel-Cover

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

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



Subject: wish: line number anchors in html (w/patch!)
Today I wanted to send a link to someone to say "look at the coverage of this subroutine, around like 300". The attached patch adds an anchor around some line numbers so you can make urls like this: coverage.html#300 There are probably some other bits of the code that need the same modification, as well as some way to discover the feature. Perhaps making each line number a hyperlink to itself would do that. Thanks for Devel::Cover! Mark
--- Html_basic.pm.orig 2005-07-09 10:28:59.427072304 -0500 +++ Html_basic.pm 2005-07-09 10:29:26.749918600 -0500 @@ -490,7 +490,7 @@ [% FOREACH line = lines %] <tr align="RIGHT" valign="CENTER"> - <td [% bg(colour = "number") %]> [% line.number %] </td> + <td [% bg(colour = "number") %]> <a name="[% line.number %]">[% line.number %]</a> </td> [% FOREACH cr = line.criteria %] <td [% bg(colour = cr.bg) %]> [% IF cr.link.defined && cr.text %] --- Html_minimal.pm.orig 2005-07-09 10:38:08.996525048 -0500 +++ Html_minimal.pm 2005-07-09 10:35:55.037889856 -0500 @@ -503,7 +503,7 @@ $sloc = escape_HTML($sloc); - print $out qq'<tr><td class="h">$.</td>'; + print $out qq'<tr><td class="h"><a name="$.">$.</a></td>'; my $metric = get_coverage_for_line($opt, $file_data, $.);
Date: Fri, 23 Sep 2005 01:30:10 +0200
From: Paul Johnson <paul [...] pjcj.net>
To: Guest via RT <bug-Devel-Cover [...] rt.cpan.org>
Subject: Re: [cpan #13615] wish: line number anchors in html (w/patch!)
RT-Send-Cc:
On Sat, Jul 09, 2005 at 11:52:46AM -0400, Guest via RT wrote: Show quoted text
> Today I wanted to send a link to someone to say "look at the coverage > of this subroutine, around like 300". The attached patch adds an > anchor around some line numbers so you can make urls like this: > > coverage.html#300
Thanks! I've applied this to the html_basic report, but not to the html_minimal report. I wan't html_minimal to remain minimal, whereas html_basic, as is obvious by the name, will become the all singing, all dancing report. This will be in the next release. Thanks again, -- Paul Johnson - paul@pjcj.net http://www.pjcj.net