From: Mike Taylor Date: Mon, 5 Mar 2007 19:40:20 +0000 (+0000) Subject: New -n option sets size of active pool. X-Git-Tag: CPAN-v1.02~556 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=85f5d43980e57da1be4a6d915aa8db23500e53e5;p=irspy-moved-to-github.git New -n option sets size of active pool. __DIE__ signal handler now set globally (though what difference can that make?) --- diff --git a/bin/irspy.pl b/bin/irspy.pl index 0e86dfd..a67edd0 100755 --- a/bin/irspy.pl +++ b/bin/irspy.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: irspy.pl,v 1.24 2007-02-27 15:01:40 mike Exp $ +# $Id: irspy.pl,v 1.25 2007-03-05 19:40:20 mike Exp $ # # Run like this: # YAZ_LOG=irspy,irspy_test IRSPY_SAVE_XML=1 perl -I../lib irspy.pl -t Quick localhost:8018/IR-Explain---1 z3950.loc.gov:7090/Voyager bagel.indexdata.dk/gils bagel.indexdata.dk:210/marc @@ -26,19 +26,20 @@ use Getopt::Std; use ZOOM::IRSpy::Web; use Carp; -local $SIG{__DIE__} = sub { +$SIG{__DIE__} = sub { my($msg) = @_; confess($msg); }; my %opts; -if (!getopts('wt:af:', \%opts) || @ARGV < 1) { +if (!getopts('wt:af:n:', \%opts) || @ARGV < 1) { print STDERR "\ Usage $0: [options] [ ...] -w Use ZOOM::IRSpy::Web subclass -t Run the specified [default: all tests] -a Test all targets (slow!) -f Test targets found by the specified query + -n Number of connection to keep in active set "; exit 1; } @@ -47,7 +48,7 @@ my($dbname, @targets) = @ARGV; my $class = "ZOOM::IRSpy"; $class .= "::Web" if $opts{w}; -my $spy = $class->new($dbname, "admin", "fruitbat"); +my $spy = $class->new($dbname, "admin", "fruitbat", $opts{n}); if (@targets) { $spy->targets(@targets); } elsif ($opts{f}) {