Skip Menu |

This queue is for tickets about the Parse-Yapp CPAN distribution.

Report information
The Basics
Id: 17356
Status: new
Priority: 0/
Queue: Parse-Yapp

People
Owner: Nobody in particular
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.05
Fixed in: (no value)



Subject: Modification of a read-only value
This is a totally weird bug, here's how to reproduce it: 1) Use a simple grammar, like A.yp: ----- %% expr: NUM; %% 2) yapp it: yapp -m A A.yp 3) use it in a way so that $_ is the loop variable (never mind the lexer, it's irrelevant): use A; my $p = A->new(); for ("5") { $p->YYParse( yylex => sub { ("NUM", "5") }, yyerror => sub { die "Error" }, yydebug => 1, ); } 4) you'll get: Modification of a read-only value attempted at /home/mschilli/PERL/lib/perl5/site_perl/5.8.7/Parse/Yapp/Driver.pm line 209. 5) However, if you localize local($_); then it works fine. It only occurs when debugging is enabled. Can you make any sense out of this? Thanks for a great module, btw., Parse::Yapp rocks!