From: Wolfram Schneider Date: Thu, 8 Apr 2010 12:09:41 +0000 (+0000) Subject: add option for maximum number of nested template calls and variables/params X-Git-Tag: CPAN-v1.02~148^2~22 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=3a4d8054ad1bcb312d538158ff207f67623c1c3e add option for maximum number of nested template calls and variables/params --- diff --git a/bin/irspy.pl b/bin/irspy.pl index d72b9d7..4e24088 100755 --- a/bin/irspy.pl +++ b/bin/irspy.pl @@ -32,7 +32,7 @@ $SIG{__DIE__} = sub { }; my %opts; -if (!getopts('wt:af:n:m:', \%opts) || @ARGV < 1) { +if (!getopts('wt:af:n:m:M:', \%opts) || @ARGV < 1) { print STDERR "\ Usage $0: [options] [ ...] -w Use ZOOM::IRSpy::Web subclass @@ -41,6 +41,7 @@ Usage $0: [options] [ ...] -f Test targets found by the specified query -n Number of connection to keep in active set -m , Only test targets whose hash mod is + -M max_depth maximum number of nested template calls and variables/params "; exit 1; } @@ -49,6 +50,11 @@ my($dbname, @targets) = @ARGV; my $class = "ZOOM::IRSpy"; $class .= "::Web" if $opts{w}; +if ($opts{M} && $opts{M} > 0) { + no warnings; + $class::xslt_max_depth = $opts{M} +} + my $spy = $class->new($dbname, "admin", "fruitbat", $opts{n}); if (@targets) { $spy->targets(@targets);