diff --git a/t/06_vars_ok_self.t b/t/06_vars_ok_self.t index b4f94bb..6553449 100644 --- a/t/06_vars_ok_self.t +++ b/t/06_vars_ok_self.t @@ -9,4 +9,10 @@ vars_ok('lib/Test/Vars.pm'); vars_ok('Test::Vars'); vars_ok('lib/Test/Vars.pm', ignore_vars => { '$self' => 1 }); +TODO: { + local $TODO = 'https://github.com/houseabsolute/p5-Test-Vars/issues/44'; + my $rv = vars_ok( 't/lib/LexicalsOutsideSub.pm' ); + ok(! $rv, "vars_ok() should tell us that 3 variables are unused"); +} + done_testing; diff --git a/t/lib/LexicalsOutsideSub.pm b/t/lib/LexicalsOutsideSub.pm new file mode 100644 index 0000000..8a337d5 --- /dev/null +++ b/t/lib/LexicalsOutsideSub.pm @@ -0,0 +1,12 @@ +package LexicalsOutsideSub; +use strict; +use warnings; + +# https://github.com/houseabsolute/p5-Test-Vars/issues/44 + +my $scalar; +my %hash; +my @array; + +1; +