On Sun, Nov 07, 2010 at 01:19:00PM -0600, Peter Karman wrote:
> The approach I have taken with libswish3 is to make the example code part of
> the
> test suite, so that if the API changes, I have to keep the example(s) up to
> date
> with it. We could do something similar with the tutorial apps.
This is a good plan; I just hadn't figured out how to make it work before.
Perhaps we could divide the sample scripts up into testable subroutines, then
performing a require/do to import its subs into the current namespace.
require "sample/indexer.pl" or die $@;
ok( parse_file("sample/us_constitution/amend10.txt"), "parse_file" );
Marvin Humphrey