On Tue, Feb 27, 2001 at 12:05:39AM -0500, barries wrote:
> On that note, I think it would be cool if you made the guts of of
> pod2test into a method of Pod::Tests, allowing others to reuse it
> without having to maul it like I did.  I personally would like to see
> something like Pod::Tests->as_string that could be evaled or printed.

I'll do that.  I'll probably just make build_examples() and
build_tests() into methods.


> > (why is Filter required... just to read the test POD?
> 
> It made the implementation of SelfTest trivial: about 120 lines of code
> that mostly just throws away everything not =for testing. I like the
> semantic that self testing is a special mode of running the file through
> perl, just like perl -cw lib/Foo.pm is.

This is irrelevant to using a Filter.

> It's also probably faster than loading Pod::Tests and having it re-open
> the source module, though, again, I'm not sure speed counts here.

It doesn't matter.  Especially not at that level.  You're pinching
pennies.  Anyway, what do you think Filter does???


> If Pod::Tests had a push style interface 'twould be extremely trivial.

So you can parse multiple files and keep adding tests to the stack?  I
can make it do that.  I don't quite see why you need it, since you're
only testing one module/file at a time, right?

Anyhow, I really want to see the finding of the testing code merged.


> > and neither is loading SelfTest and all the caveats and
> > extra code involved there.
> 
> Hmmm, what caveats about loading SelfTest?  

Tests should not modifiy the code being tested.  SelfTest violates
that rule, but only slightly.  About the only effect I can think of
its adding entries to %INC.  This shouldn't matter to most programs,
so I withdraw the objection.


> > And =alsofor (or =also for) has all sorts of problems, I don't think
> > it will work.  Most existing POD readers and formatters choke on it. :(
> 
> =for example
> 
> is actually worse from a backwards compatibility point of view

I'm not suggesting =for example.  I don't have any good way to include
example code and have it work with existing POD viewers.  Just be
aware that most POD viewers, including perldoc, will die if they see
an unknown POD tag.  This means =also and =alsofor.

This is Very Bad for getting this working under Perl 5.  Even if we
modified the POD tools, people who haven't upgraded wouldn't be able
to read the docs.  That's Bad.

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
my mother once said                                                     
"never eat paste my darling"                    
would that I heeded
        -- stimps

Reply via email to