From 3a4d8054ad1bcb312d538158ff207f67623c1c3e Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Thu, 8 Apr 2010 12:09:41 +0000 Subject: [PATCH] add option for maximum number of nested template calls and variables/params --- bin/irspy.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 1.7.10.4