diff options
-rw-r--r-- | t/state.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/state.t b/t/state.t new file mode 100644 index 0000000..c1fadbf --- /dev/null +++ b/t/state.t @@ -0,0 +1,17 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; + +use 5.10.0; +use Fun; + +fun bar ($y) { + state $x = 10; + $x * $y; +} + +is(bar(3), 30); + +done_testing; |