If I give the module (SalesReport.pm6) and the grammar declared in it (grammar
SalesReport) the same name, I get a
"no such method 'parsefile' for invocant of type 'SalesReport'" error, when
the following lines are run:
use lib '.';
use SalesReport;
my $parsed = SalesReport.parsefile('sales_report.txt');
----- Mail original -----
De: "Brandon Allbery" <[email protected]>
À: [email protected]
Cc: [email protected]
Envoyé: Lundi 25 Mars 2013 16:08:14
Objet: Re: Problem using a module containing a grammar
On Mon, Mar 25, 2013 at 11:01 AM, < [email protected] > wrote:
grammar SalesExportGram is export {
(...)
my $parsed = SalesReportGram.parsefile('sales_report.txt');
Might help if you used the same name in both places?
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net