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