[sword-devel] New Perl Sword Interface

John Keiser sword-devel@crosswire.org
16 Jul 2001 23:55:54 -0400


Well, I've written a library interface to Sword.  Right now I'm sure it
works with 1.5.2 because I've tested it.  It links directly to the
library for maximum speed.

The package is attached.  The README has full docs.  Here is an example
that prints out the KJV:

use Sword;
my $vi = new Sword::VerseIterator("KJV");
do {
        print $vi->get_key . " : " . $vi->get_verse . "\n";
} while($vi->next);


QUESTION
--------
I have some ideas for improving the interface, but for efficiency
reasons, I'd like to know a few things ... is there a way to:
- Get a list of books in a module
- Get a list of chapters in a book
- Get a list of verses in a chapter

This could make the Perl interface even nicer for web sites that want to
browse.

--John