From dada38b3c1825160224113cfe0fbfe3b1362d274 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 13 Sep 2023 14:46:51 +1000 Subject: [PATCH] add TODO tests for 19370 --- t/op/eval.t | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/t/op/eval.t b/t/op/eval.t index 6847a5beabaf..8eab66c075b7 100644 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -6,7 +6,7 @@ BEGIN { set_up_inc('../lib'); } -plan(tests => 167); +plan(tests => 169); eval 'pass();'; @@ -377,6 +377,19 @@ our $x = 1; is(DB::db4(), 3); is(DB::db5(), 3); is(db6(), 4); + + # [GH #19370] + local $TODO = "outside not available when needed"; + my sub d6 { + DB::db3(); + } + is(d6(), 3); + my $y; + my $d7 = sub { + $y; + DB::db3(); + }; + is($d7->(), 3); } # [perl #19022] used to end up with shared hash warnings