I'm just now drafting and testing Inline::Spew. Usage:
use Inline Spew => <<'END';
START: "The " noun " " verb "."
noun: "dog" | "cat" | "rat"
verb: "runs" | "sits" | smiles"
END
my $sentence = spew(); # uses START by default
my $one_noun = spew("noun");
Grammar and examples are defined in
<http://www.stonehenge.com/merlyn/LinuxMag/col04.html>.
I have one config param... SUB => "spew" if you want to create a
subroutine other than "spew".
Cool. Fun. Coming to CPAN near you. (Woo hoo! My first module!)
The compilation of spew-source to spew-object is what Inline works
well at, since there's an extra CPU second of overhead the first time.
Question: How do you write tests for Inline::* to see whether the
compilation was cached?
Question: Is Inline-API out of date? I see the CONFIG params in CONFIG,
not in ILSM.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!