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" <allber...@gmail.com>
À: phi...@free.fr
Cc: perl6-language@perl.org
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, < phi...@free.fr > 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 
allber...@gmail.com ballb...@sinenomine.net 
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Reply via email to