blib/lib/Text/Trac/Macro.pm

filter: Statementstmt 100% 31 / 31 Branchbran 100% 4 / 4 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 7 / 7 Podpod 50.0% 1 / 2 totaltotal 93.6% 44 / 47 SCAR 17.9
CC
6
Cov
97%
parse
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.0
« blib/lib/Text/Trac/Pre.pm ↑ Summary blib/lib/Text/Trac.pm »
1 package Text::Trac::Macro;
2 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 53 ▶use base qw(Text::Trac::InlineNode Class::Accessor::Fast);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 53 ▶use UNIVERSAL::require;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 53 ▶use Text::ParseWords qw(quotewords);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 53 our $VERSION = '0.23';
10  
11 53 __PACKAGE__->mk_accessors('pattern');
12  
13 sub new {
14 19 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
15 19 my $self = {};
16 19 bless $self, $class;
17 19 return $self;
18 }
19  
20 sub parse {
21 19 ▶ my ( $self, $name, $args, $match ) = @_;
Subroutine parse: called CC=6 SCAR=17.9
Pod undocumented
22 19 my $c = $self->{context};
23  
24 19 ▶ my @args = $args ? quotewords( ',\s*', 0, $args ) : ();
Branch: 1 branch
BranchTrueFalseTotal
$args ? : 17 2 19
25 19 s/^\s+|\s+$//g for @args;
26  
27 19 foreach my $class ( "Text::Trac::Macro::$name", $name ) {
28 35 ▶ if ( $class->require ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($class->require) 3 32 35
29 3 ▶ $match = $class->process( $c, @args ) || '';
Condition50%1/2
$class->process($c, @args) || ''
l!l
30
MC/DC0%0/1
$class->process($c, @args) || ''
$class->process($c, @args)
Truth table50%1/2
A
A= $class->process($c, @args)
Aresult
11
00
30 3 last;
31 }
32 }
33  
34 19 return $match;
35 }
36  
37 53 1;
« blib/lib/Text/Trac/Pre.pm ↑ Summary blib/lib/Text/Trac.pm »