Parse-Perl

 view release on metacpan or  search on metacpan

t/lex_hinthash.t  view on Meta::CPAN


use Test::More tests => 1 + 2*9;
BEGIN { use_ok "Parse::Perl", qw(current_environment parse_perl); }

BEGIN { $SIG{__WARN__} = sub { die "WARNING: $_[0]" }; }

my($env_0, $env_A, $env_B);
$env_0 = current_environment;
{ BEGIN { $^H |= 0x20000; $^H{foo} = "A"; } $env_A = current_environment; }
{
	BEGIN { $^H |= 0x20000; $^H{foo} = $main::b_av = ["B"]; }
	$env_B = current_environment;
}

my $have_runtime_hint_hash = "$]" >= 5.009004;

sub test_env_1() {
	push @main::activity, [
		1,
		($have_runtime_hint_hash ?
			(((caller(0))[10] || {})->{foo})



( run in 0.241 second using v1.01-cache-2.11-cpan-05444aca049 )