return $this;
}
+# wrapper to read the IRSpy database name from environment variable / apache config
+sub connect_to_registry {
+ my %args = @_;
+
+ # XXX: we could also handle her: user, password, elementSetName
+
+ my $database = $ENV{IRSpyDbName} || "localhost:8018/IR-Explain---1";
+
+ return $database;
+}
sub log {
my $this = shift();
$ZOOM::IRSpy::irspy_to_zeerex_xsl = $irspy_to_zeerex_xsl
if $irspy_to_zeerex_xsl;
-my $dbname = 'localhost:8018/IR-Explain---1';
+my $dbname = ZOOM::IRSpy::connect_to_registry();
my $spy = new ZOOM::IRSpy( $dbname, "admin", "fruitbat" );
isa_ok( $spy, 'ZOOM::IRSpy' );