blib/lib/Bootylicious/Decorator.pm

filter: Statementstmt 100% 24 / 24 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 91.6% 33 / 36 CC 4 SCAR 9.5
CC
4
Cov
90%
AUTOLOAD
4.2
BEGIN
1.0
BEGIN
1.0
CRAP 2.6
« blib/lib/Bootylicious/FileIteratorLoader.pm ↑ Summary blib/lib/Bootylicious/Article.pm »
1 package Bootylicious::Decorator;
2  
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 13 ▶use base 'Mojo::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 13 __PACKAGE__->attr('object');
9  
10 sub new {
11 31 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
12 31 my $object = shift;
13  
14 31 my $self = $class->SUPER::new(@_);
15  
16 31 $self->object($object);
17  
18 31 return $self;
19 }
20  
21 13 our $AUTOLOAD;
22  
23 sub AUTOLOAD {
24 72 ▶ my $self = shift;
Subroutine AUTOLOAD: called CC=4 SCAR=14.3
25  
26 72 my $method = $AUTOLOAD;
27  
28 72 ▶ return if $method =~ /^[A-Z]+?$/;
Branch: 1 branch
BranchTrueFalseTotal
if $method =~ /^[A-Z]+?$/ 0 72 72
29 72 ▶ return if $method =~ /^_/;
Branch: 1 branch
BranchTrueFalseTotal
if $method =~ /^_/ 0 72 72
30 72 ▶ return if $method =~ /(?:\:*?)DESTROY$/;
Branch: 1 branch
BranchTrueFalseTotal
if $method =~ /(?:\:*?)DESTROY$/ 0 72 72
31  
32 72 $method = (split '::' => $method)[-1];
33  
34 72 return $self->object->$method(@_);
35 }
36  
37 13 1;
« blib/lib/Bootylicious/FileIteratorLoader.pm ↑ Summary blib/lib/Bootylicious/Article.pm »