Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pegex CPAN distribution.

Report information
The Basics
Id: 82587
Status: resolved
Priority: 0/
Queue: Pegex

People
Owner: Nobody in particular
Requestors: vitaliy.tokarev [...] gmail.com
Cc:
AdminCc:

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



Subject: Typo in document pod
File "lib/Pegex/API.pod": package Calculator; use base 'Pegex.Receiver'; sub got_expr { my ($receiver, $data) = @_; my ($a, $b) = @$data; return $a + $b; } First of all, instead of 'Pegex.Receiver' must be placed 'Pegex::Receiver'. Secondly, much important, to get correct result of "2+2" we need rewrite base class like that: use base qw(Pegex::Tree); When sub-classing of Pegex::Receiver the $data will contains array ref. "[1,1,1,1]" in package Calculator above. I do not know why its happens at this moment, but its a bit annoying when met first time with new module. It is just does not work properly :) And execution line from same pod is: print pegex(grammar, receiver => 'Calculator')->parse('2+2'); Thanks!
Fixed in git