summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMatt Selsky <selsky@columbia.edu>2012-05-29 17:24:17 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-05-29 17:24:17 +0200
commitaba3f550feb4e69d3df9c24097784f1cd94dadf6 (patch)
tree27ed277bb76222664ae0490a32a77b40e2e7ea38 /contrib
parent038df43c5a3d51bd66772a7df7e6403eebe1b913 (diff)
downloadbugzilla-aba3f550feb4e69d3df9c24097784f1cd94dadf6.tar.gz
bugzilla-aba3f550feb4e69d3df9c24097784f1cd94dadf6.tar.xz
Bug 661479: Add a debug/trace option to bz_webservice_demo.pl
r/a=LpSolit
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/bz_webservice_demo.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/bz_webservice_demo.pl b/contrib/bz_webservice_demo.pl
index 798a7621e..906db7d2c 100755
--- a/contrib/bz_webservice_demo.pl
+++ b/contrib/bz_webservice_demo.pl
@@ -45,6 +45,7 @@ my $add_comment;
my $private;
my $work_time;
my $fetch_extension_info = 0;
+my $debug;
GetOptions('help|h|?' => \$help,
'uri=s' => \$Bugzilla_uri,
@@ -58,7 +59,8 @@ GetOptions('help|h|?' => \$help,
'comment:s' => \$add_comment,
'private:i' => \$private,
'worktime:f' => \$work_time,
- 'extension_info' => \$fetch_extension_info
+ 'extension_info' => \$fetch_extension_info,
+ 'debug' => \$debug
) or pod2usage({'-verbose' => 0, '-exitval' => 1});
=head1 OPTIONS
@@ -130,6 +132,10 @@ An optional double precision number specifying the work time for B<--comment>.
If specified on the command line, the script returns the information about the
extensions that are installed.
+=item --debug
+
+Enable tracing at the debug level of XMLRPC requests and responses.
+
=back
=head1 DESCRIPTION
@@ -167,6 +173,16 @@ of C<http://your.bugzilla.installation/path/to/bugzilla/xmlrpc.cgi>.
my $proxy = XMLRPC::Lite->proxy($Bugzilla_uri,
'cookie_jar' => $cookie_jar);
+=head2 Debugging
+
+Enable tracing at the debug level of XMLRPC requests and responses if requested.
+
+=cut
+
+if ($debug) {
+ $proxy->import(+trace => 'debug');
+}
+
=head2 Checking Bugzilla's version
To make sure the Bugzilla you're connecting to supports the methods you wish to