Michael G Schwern wrote: > > On Fri, Sep 01, 2000 at 12:18:32AM -0400, Barrie Slaymaker wrote: > > Here's a quick take on a Pod::Tests, I threw it together as part of my =also > > prototype code. > > Looking at the docs... umm, how do you use it? Let's assume I don't > know how to use Pod::Select (which isn't too far from the truth.) Docs? you want docs? :-). It's just a start: I got it working enough to see that it's feasible, haven't had time to clean it up yet. > I insinuated in the RFC that Pod::Tests is to simply go through the > POD and pull out the "=for testing" and "=also for example" blocks and > present them to the module user in some data structure. Then whatever > program using Pod::Tests can determine what to actually do with them. > pod2tests would actually contain the logic for producing the .t files. > Looking at the code, I *think* that's the way you made it work... I > guess. Nope, but that's why I sent it out early for people to poke at. I made parse_from_file() take an output directory name as the required second arg instead of an optional output file name: I wanted it be used like Pod::Parser's parse_from_file(), while retaining the ability to write multiple output files in a test directory. > PS I really don't like "=also_for". Not only does it look bad, but also > means we need "=also_begin" and "=also_end" as individual tags. It was suggested by Russ Alberry on 2000-08-04, then I showed it in an example or three and nobody complained, so I ran with it. Russ wrote: > > What I still don't like about the syntax is that C<=also for>, C<=also > begin>, and C<=also end> are really keywords in their own right; if we > implement these sorts of tags, I think we should avoid keywords that > contain spaces. Something like C<=alsofor> instead would be better, IMO. > > $self->parse_from_file( $file_name ) ; > > Shouldn't that be $self->SUPER::parse_from_file( $file_name )? > Fixed, thanks. I'll send out a tested version later this weekend (thought I had tested it, probably fell asleep on the keyboard and dreamt it :-). - Barrie
