Nested/Expander.pm

filter: Statementstmt 100% 15 / 15 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 22 / 22 CC 2 SCAR 3.4
CC
2
Cov
100%
split_name
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
↑ Summary Nested.pm »
1 package Catalyst::Plugin::Params::Nested::Expander;
2 1 ▶use base qw/CGI::Expand/;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 9 ▶sub split_name {
Subroutine split_name: called CC=2 SCAR=6.9
Pod documented
8 9 my ( $class, $name ) = @_;
9  
10 9 ▶ if ( $name =~ /^ .*? \[ \S+ \]/x ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($name =~ /^ .*? \[ \S+ \]/x) { } 4 5 9
11 4 return grep { defined } ( $name =~ /
12 ^ (\w+) # root param
13 | \[ (\w+) \] # nested
14 /gx );
15 } else {
16 5 return $class->SUPER::split_name( $name );
17 }
18 }
19  
20  
21 1 __PACKAGE__;
22  
23 __END__
↑ Summary Nested.pm »