On 31/10/02 13:41 -0800, Randal L. Schwartz wrote:
> 
> 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

OK. Let's make this a little more general. And why isn't this YAML??

use Inline Madlib => <<'END_SCHWARTZIAN';
function:
  randalism: >
    The once was a %noun% named Randal, who did a lot of %lang%
    programming. He %verb%ed by day and %verb%ed even more by 
    night. His first CPAN module was called Inline::%ilsm%.
noun: [guru, pundit, scalliwag]
lang: [Perl, Python, French]
verb: [eat, drink, be merry]
ilsm: [Spew, Madlib, Merlyn]
END_SCHWARTZIAN

print randalism;

> 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 guess I should read this :)

> 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.

I'll give it a check later. Busy being merry, ATM :)

Cheers, Brian

Reply via email to