X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=t%2Flib%2Fget_strictures_hints.pm;h=0af3e90690566c2976289935a3dedbd242ef2413;hp=f3f36fd8900df0addad67fc4c0480edc4566f719;hb=6c8bf56cd4942ec40e37a6db79d4bab121e1cff8;hpb=c97f63974c1d1d0b422306ab24391fd256cbeceb diff --git a/t/lib/get_strictures_hints.pm b/t/lib/get_strictures_hints.pm index f3f36fd..0af3e90 100644 --- a/t/lib/get_strictures_hints.pm +++ b/t/lib/get_strictures_hints.pm @@ -1,21 +1,21 @@ package get_strictures_hints; -local $ENV{PERL_STRICTURES_EXTRA} = 0; -our $strictures_hints; -our $strictures_warn; +sub hints { + local $ENV{PERL_STRICTURES_EXTRA} = 0; + my $strictures_hints; + my $strictures_warn; -eval q{ - use strictures 1; - BEGIN { - # Find the hint value that 'use strictures 1' sets on this perl. - $strictures_hints = $^H; - $strictures_warn = ${^WARNING_BITS}; - }; - 1; -} or die $@; + eval q{ + use strictures 1; + BEGIN { + # Find the hint value that 'use strictures 1' sets on this perl. + $strictures_hints = $^H; + $strictures_warn = ${^WARNING_BITS}; + }; + 1; + } or die $@; -require Exporter; -*import = \&Exporter::import; -our @EXPORT = qw($strictures_hints $strictures_warn); + return ($strictures_hints, $strictures_warn); +} 1;