On Thu, Jul 27, 2000 at 03:21:05PM -0400, Barrie Slaymaker wrote:
> One way I can see to work around your dilema would be kludgy:
>
> =begin example_preamble
>
> #!perl -w
> use LWP::Simple
> use Test ;
>
> =end example_preamble
>
> $page = get("http://www.perl.org");
>
> =begin example_postamble
>
> ok( $page, qr/foo/ ) ;
>
> =end example_postamble
>
> Anything that is indented between =begin example_preamble and =end
> example_postamble would be the test script, anything with no leading
> spaces would have '# ' prepended.
Oh, I just re-read this. This is similar to what I was thinking.
Just a few changes:
. Don't rely on both a preamble and a postamble (postambles are
optional)
. all consecutive verbatim paragraphs after a "=end example_preamble"
would be a single set of code to test.
. Better names than "example_preamble" and "example_postamble" ... How
about "test_init" and "test_end" (or "test_test" :-)?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]