I'm trying to precompile a
Parse::RecDescent grammar as part of building my module. In
Build.PL I have:
use Module::Build;
use Parse::RecDescent;
my $class = Module::Build->subclass(code => <<'EOF');
sub ACTION_build {
my $self = shift;
open FILE, "grammar" or die "could not open \"grammar\": $!";
my $grammar;
{
local $/;
$grammar = <FILE>;
}
Parse::RecDescent->Precompile($grammar, "My::Grammar");
$self->SUPER::ACTION_build;
}
EOF
Build is generated without incident; but when it is run I get:
Can't locate object method "Precompile" via package "Parse::RecDescent
+" (perhaps you forgot to load "Parse::RecDescent"?) at /home/braden/s
+rc/endoframe/literally/trunk/_build/lib/MyModuleBuilder.pm line 13, <
+FILE> line 1.
What's the proper way to tell
Module::Build about
Parse::RecDescent?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.