develooper Front page | perl.perl5.porters | Postings from August 2003

[PATCH] XSLoader nits and tests

Thread Next
Michael G Schwern
August 29, 2003 22:59
[PATCH] XSLoader nits and tests
Message ID:
I've added some really basic tests for XSLoader as well as cleaning up
a few nits in the code.

User visable changes:
load() will now die with a usage message if it gets no args rather than
just puking its guts out.

Doc changes:
The SYNOPSIS documented the second argumen to load() as "@args".  It seems
more useful to call it some variation on $VERSION.

Code changes:
There were a bunch of comments and code copied from DynaLoader which seemed
to be cargo-cult.  Particularly, the Tolkien quote which I've removed.
A better quote would be something about making a quick meal. :)

. XSLoader loads.
. XSLoader::load() exists
. load() dies gracefully with no args
. SDBM_File can be loaded (I picked SDBM_File because I think its always

That last test of SDBM_File isn't entirely correct.  Because there's no
.so in the directory with the test, XSLoader can't find it so it will always
fall back to DynaLoader.  So its only testing a small portion of XSLoader.
Still, its better than nothing.

The test might need some sort of "am I using dynamic loading" check.

Michael G Schwern
You'll do.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About