summaryrefslogtreecommitdiff
path: root/t/todo_tests/wrong-inner.t
diff options
context:
space:
mode:
Diffstat (limited to 't/todo_tests/wrong-inner.t')
-rw-r--r--t/todo_tests/wrong-inner.t37
1 files changed, 37 insertions, 0 deletions
diff --git a/t/todo_tests/wrong-inner.t b/t/todo_tests/wrong-inner.t
new file mode 100644
index 0000000..5160ca4
--- /dev/null
+++ b/t/todo_tests/wrong-inner.t
@@ -0,0 +1,37 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+# see RT#89397
+
+{
+ package A;
+ use Moose;
+ sub run {
+ my $self = shift;
+ inner();
+ $self->cleanup;
+ }
+ sub cleanup {
+ inner();
+ }
+}
+
+{
+ package B;
+ our $run;
+ use Moose;
+ extends 'A';
+ augment run => sub {
+ my $self = shift;
+ $run++;
+ };
+}
+
+B->new->run();
+
+local $TODO = 'wtf is going on here??';
+is($B::run, 1, 'B::run is only called once');
+
+done_testing;