« blib/lib/Text/Trac/LinkResolver/Attachment.pm
↑ Summary
blib/lib/Text/Trac/LinkResolver/Report.pm »
| 1 | package Text::Trac::LinkResolver::Milestone; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 48 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 48 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 48 | ▶ | use base qw( Text::Trac::LinkResolver ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 48 | our $VERSION = '0.23'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | sub init { | ||||||||||||||||||||
| 10 | 5462 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 11 | } | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | sub format_link { | ||||||||||||||||||||
| 14 | 6 | ▶ | my ( $self, $match, $target, $label ) = @_; | ||||||||||||||||||
|
Subroutine
format_link: called CC=5 SCAR=16.4
Pod
undocumented
| |||||||||||||||||||||
| 15 | 6 | ▶ | return $match if $self->_is_disabled; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 5 | my $c = $self->{context}; | |||||||||||||||||||
| 18 | 5 | ▶ | $label ||= $match; | ||||||||||||||||||
|
Condition33%1/3
$label ||= $match
MC/DC0%0/2
$label ||= $match
$label
$match
Truth table33%1/3
A ||= B
A= $labelB= $match
| |||||||||||||||||||||
| 19 | 5 | my ( $from, $to ) = ( $match =~ m/(\d+):(\d+)/ ); | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 5 | ▶ | my $url = $c->{trac_milestone_url} || $c->trac_url . 'milestone/'; | ||||||||||||||||||
|
Condition100%2/2
$c->{'trac_milestone_url'} || $c->trac_url . 'milestone/'
MC/DC100%1/1
$c->{'trac_milestone_url'} || $c->trac_url . 'milestone/'
$c->{'trac_milestone_url'}
Truth table100%2/2
A
A= $c->{'trac_milestone_url'}
| |||||||||||||||||||||
| 22 | 5 | $url .= $target; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 5 | ▶ | return sprintf '<a %s href="%s">%s</a>', ( $c->{class} ? q{class="milestone"} : '' ), $url, $label; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 48 | 1; | |||||||||||||||||||