use strict;
use feature "state";
-plan tests => 34;
+plan tests => 37;
ok( ! defined state $uninit, q(state vars are undef by default) );
is($ls, "2/3", 'list assignment to state scalars');
$ls = statelist2();
is($ls, "3/4", 'list assignment to state scalars');
+
+# Recursion
+
+sub noseworth {
+ my $level = shift;
+ state $recursed_state = 123;
+ is($recursed_state, 123, "state kept through recursion ($level)");
+ noseworth($level - 1) if $level;
+}
+noseworth(2);