Skip Menu |

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

Report information
The Basics
Id: 61488
Status: rejected
Priority: 0/
Queue: Parse-RecDescent

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

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



Subject: perl -MParse::RecDescent different behavior than "use Parse::RecDescent;"
$ perl -MParse::RecDescent -e '' Usage: perl -MLocalTest - <grammarfile> <classname> is different than $ perl -e 'use Parse::RecDescent;' I would not expect this behavior. perl -e 'use Parse::RecDescent; print Parse::RecDescent->VERSION, "\n"' 1.962.2 Thanks, Mike mrdvt92
Subject: Re: [rt.cpan.org #61488] perl -MParse::RecDescent different behavior than "use Parse::RecDescent;"
Date: Tue, 21 Sep 2010 06:24:38 +1000
To: bug-Parse-RecDescent [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Mike, Thanks for the feedback. Show quoted text
> $ perl -MParse::RecDescent -e '' > Usage: perl -MLocalTest - <grammarfile> <classname> > > is different than > > $ perl -e 'use Parse::RecDescent;' > > I would not expect this behavior.
The special behaviour of the first form is documented under "Precompiling parsers". The behaviour of the second form is standard Perl behaviour (and preserved to ensure that it's still possible to invoke the module from the commandline, despite the special behaviour of the first form). Now, arguably, it was a mistake (albeit a very convenient one for many people) to allow the special behaviour of the first form. If I were writing the module today, I would certainly not co-opt the -M flag for my own purposes in that way. Unfortunately, it's now too late to change that interface, as many people have come to rely on that special behaviour. I do sincerely apologize, however, for any confusion (or wasted time) it may have caused you. Damian
Changing status to "rejected".