Subject: | Unimported variable - state feature not enabled |
Running on Perl 5.10.1 I get this error
Variable "$stuifzand_grammar" is not imported at
/usr/local/lib/perl/5.10.1/Marpa/R2/Stuifzand.pm line 349, <DATA> line 1.
Oddly I do not get this error when running the tests for the parser that
I wrote using Marpa:R2. The error only appears when using the parser
class in a DBIx::Class::ResultSet.
The cause was that the state feature had not been enabled. Adding
use feature qw( state );
to Stuifzand.pm fixes the problem. Patch attached
Subject: | Stuifzand.diff |
--- Stuifzand.pm 2012-11-22 10:38:39.000000000 +0000
+++ Stuifzand.pm 2012-11-22 10:39:01.000000000 +0000
@@ -28,6 +28,8 @@
package Marpa::R2::Internal::Stuifzand;
+use feature qw( state );
+
use English qw( -no_match_vars );
# Undo any rewrite of the symbol name