File Coverage

blib/lib/Pad/Tie/LP.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 4 4 100.0
pod 1 1 100.0
total 23 24 95.8


line stmt bran cond sub pod time code
1 2     2   9 use strict;
  2         2  
  2         40  
2 2     2   5 use warnings;
  2         2  
  2         51  
3              
4             package Pad::Tie::LP;
5              
6 2     2   5 use base 'Lexical::Persistence';
  2         2  
  2         882  
7              
8             sub parse_variable {
9 11     11 1 155 my ($self, $var) = @_;
10              
11 11         45 my ($sigil, $context, $member) = $self->SUPER::parse_variable($var);
12              
13 11 100 66     123 if ($context eq '_' and not exists $self->{context}{_}{$member}) {
14 1         2 return; # don't auto-vivify _
15             }
16              
17 10         18 return ($sigil, $context, $member);
18             }
19              
20             1;