[Chicago-talk] Testing a module installation

Steven Lembark lembark at wrkhors.com
Fri Jan 30 07:35:04 PST 2009

> Once Java, Inline, and Inline::Java is installed my module installs
> fine.  But I doubt the testers will ever have the proper env setup for
> me to have a clean install.

Then you need to include the proper dependencies in
your metadata (e.g., Makefile.PL) and add some
sanity checks into the first few tests that puke
if there isn't any way to get the java working
properly. Look at what ./configure does in compiling
a collection of trivial programs that probe small
parts of the build environment.

For example you might have the minimal piece of
Inline::Java that compiles a fifty-liner [whatever
the shortest piece of Java takes...]. If that
does not succeed you BAIL_OUT with a nastygram
about having java installed.

The test might require calling one of the Inline
sub's to compile a piece of provided Java (vs
just doing it at compile time via Inline::Java
included block). The return from that would give
you a useful error message (probably via $@)
that Java ain't cuttin' it on the box.

Fastest way would be to expropriate whatever
tests in Inline::Java are used for this. You
could probably paste them wholesale into

Steven Lembark                                            85-09 90th St.
Workhorse Computing                                 Woodhaven, NY, 11421
lembark at wrkhors.com                                      +1 888 359 3508

More information about the Chicago-talk mailing list