From 279be81c48fdb4dd10dc7257f7377ddd8421c78f Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Tue, 21 Apr 2015 23:06:48 +0200 Subject: [PATCH] fix for perl 5.21.7 and later Implementation of cpansprout's suggestion, see https://github.com/gfx/p5-Test-Vars/issues/11 --- lib/Test/Vars.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Test/Vars.pm b/lib/Test/Vars.pm index 4bfb614..708c8b6 100644 --- a/lib/Test/Vars.pm +++ b/lib/Test/Vars.pm @@ -236,7 +236,7 @@ sub _count_padvars { if($padname->can('PVX')){ my $pv = $padname->PVX; - if($pv ne '&' && !($padname->FLAGS & B::SVpad_OUR)){ + if(defined $pv && $pv ne '&' && !($padname->FLAGS & B::SVpad_OUR)){ my %p; $p{name} = $pv; -- 2.1.2