blib/lib/WWW/Shopify/Model/NestedItem.pm

filter: Statementstmt 50.0% 10 / 20 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 33.3% 1 / 3 totaltotal 40.0% 14 / 35 CC 4 SCAR 17.7
CC
4
Cov
38%
parent
12.0
identifier
6.0
is_nested
2.0
CRAP 5.9
« blib/lib/WWW/Shopify/Model/Cart.pm ↑ Summary blib/lib/WWW/Shopify/Model/Order/ShippingLine.pm »
1 #!/usr/bin/perl
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package WWW::Shopify::Model::NestedItem;
7 1 ▶use parent 'WWW::Shopify::Model::Item';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub is_nested { return 1; }
Subroutine is_nested: not called CC=1 SCAR=6.9
Pod undocumented
10 # Has a parent object; default is the above package nest.
11 0 ▶sub parent { my $package = $_[0]; $package = ref($package) if ref($package); die new WWW::Shopify::Exception($package) unless $package =~ m/(.*?)\:\:\w+$/; return $1; }
Subroutine parent: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
if ref $package 0 0 0
unless $package =~ /(.*?)\:\:\w+$/ 0 0 0
12 # Everything taken together on a nested item is an identifier.
13 0 ▶sub identifier { return 'id' if $_[0]->field('id'); return map { $_->name } grep { !$_->is_relation } values(%{$_[0]->fields}); }
Subroutine identifier: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if $_[0]->field("id") 0 0 0
14  
15 1 1
« blib/lib/WWW/Shopify/Model/Cart.pm ↑ Summary blib/lib/WWW/Shopify/Model/Order/ShippingLine.pm »