From: Wolfram Schneider Date: Thu, 8 Apr 2010 15:14:04 +0000 (+0000) Subject: add debuging option X-Git-Tag: CPAN-v1.02~148^2~21 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=30b2f2ff19bcbba068822bd587c54b20fa50c0be;p=irspy-moved-to-github.git add debuging option --- diff --git a/bin/irspy.pl b/bin/irspy.pl index 4e24088..963c1b5 100755 --- a/bin/irspy.pl +++ b/bin/irspy.pl @@ -32,9 +32,10 @@ $SIG{__DIE__} = sub { }; my %opts; -if (!getopts('wt:af:n:m:M:', \%opts) || @ARGV < 1) { +if (!getopts('dwt:af:n:m:M:', \%opts) || @ARGV < 1) { print STDERR "\ Usage $0: [options] [ ...] + -d debug -w Use ZOOM::IRSpy::Web subclass -t Run the specified [default: all tests] -a Test all targets (slow!) @@ -52,7 +53,11 @@ $class .= "::Web" if $opts{w}; if ($opts{M} && $opts{M} > 0) { no warnings; - $class::xslt_max_depth = $opts{M} + $ZOOM::IRSpy::xslt_max_depth = $opts{M}; +} +if ($opts{d}) { + no warnings; + $ZOOM::IRSpy::debug = $opts{d}; } my $spy = $class->new($dbname, "admin", "fruitbat", $opts{n});