File Coverage

blib/lib/Pad/Tie/LP.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 6 6 100.0
pod 3 3 100.0
total 29 30 96.6


line stmt bran cond sub pod time code
1 2     2   15 use strict;
  2         5  
  2         71  
2 2     2   10 use warnings;
  2         2  
  2         65  
3              
4             package Pad::Tie::LP;
5              
6 2     2   9 use base 'Lexical::Persistence';
  2         4  
  2         2407  
7              
8             sub parse_variable {
9 15     15 1 281 my ($self, $var) = @_;
10              
11 15         63 my ($sigil, $context, $member) = $self->SUPER::parse_variable($var);
12              
13 15 100 66     300 if ($context eq '_' and not exists $self->{context}{_}{$member}) {
14 3         11 return; # don't auto-vivify _
15             }
16              
17 12         138 return ($sigil, $context, $member);
18             }
19              
20             # don't actually ever push arg context
21 9     9 1 184 sub push_arg_context { shift->get_context("arg") }
22              
23             # no-op, since we never changed it to begin with
24 9     9 1 21416 sub pop_arg_context { () }
25              
26             1;