Tie/LP.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 93.9% 31 / 33 CC 3 SCAR 5.6
CC
3
Cov
95%
parse_variable
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« Tie/Plugin/List.pm ↑ Summary Tie/Plugin/Scalar.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Pad::Tie::LP;
5  
6 2 ▶use base 'Lexical::Persistence';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 15 ▶sub parse_variable {
Subroutine parse_variable: called CC=3 SCAR=11.0
Pod documented
9 15 my ($self, $var) = @_;
10  
11 15 my ($sigil, $context, $member) = $self->SUPER::parse_variable($var);
12  
13 15 ▶ if ($context eq '_' and not exists $self->{context}{_}{$member}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($context eq "_" and not exists $self->{"context"}{"_"}{$member}) 3 12 15
Condition66%2/3
$context eq "_" and not exists $self->{"context"}{"_"}{$member}
!ll&&!rl&&r
0123
MC/DC50%1/2
$context eq "_" and not exists $self->{"context"}{"_"}{$member}
$context eq "_" not exists $self->{"context"}{"_"}{$member}
Truth table66%2/3
A and not(B)
A= $context eq "_"B= not exists $self->{"context"}{"_"}{$member}
ABresult
0X0
100
111
14 3 return; # don't auto-vivify _
15 }
16  
17 12 return ($sigil, $context, $member);
18 }
19  
20 # don't actually ever push arg context
21 9 ▶sub push_arg_context { shift->get_context("arg") }
Subroutine push_arg_context: called CC=1 SCAR=0.0
Pod documented
22  
23 # no-op, since we never changed it to begin with
24 9 ▶sub pop_arg_context { () }
Subroutine pop_arg_context: called CC=1 SCAR=0.0
Pod documented
25  
26 2 1;
« Tie/Plugin/List.pm ↑ Summary Tie/Plugin/Scalar.pm »