File: 50debug.dpatch

package info (click to toggle)
libnetxap-perl 0.02-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 232 kB
  • ctags: 276
  • sloc: perl: 1,595; sh: 156; makefile: 49
file content (22 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10debug.dpatch by Niko Tyni <ntyni@iki.fi>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Suppress debug output unless we actually asked for it.
## DP: Originally from Morten Bgeskov (#319558)


@DPATCH@
diff -urNad trunk~/Net/IMAP.pm trunk/Net/IMAP.pm
--- trunk~/Net/IMAP.pm	2006-05-13 20:26:27.000000000 +0300
+++ trunk/Net/IMAP.pm	2006-05-13 20:26:39.501177325 +0300
@@ -2088,7 +2088,8 @@
   my %hash = @{Net::xAP->parse_fields($str)->[0]};
   for my $key (keys %hash) {
     my $lckey = lc($key);
-    print "$lckey $hash{$key}\n";
+    print "$lckey $hash{$key}\n"
+      if $parent->debug;
     if ($lckey eq 'envelope') {
       $self->{Items}{$lckey} = Net::IMAP::Envelope->new($hash{$key});
     } elsif (($lckey eq 'bodystructure') || ($lckey eq 'body')) {