File: 70search.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 (24 lines) | stat: -rw-r--r-- 691 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
23
24
#! /bin/sh /usr/share/dpatch/dpatch-run
## 70search.dpatch by Niko Tyni <ntyni@iki.fi>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix 'use of uninitialized value' messages when an IMAP search
## DP: doesn't match.
## DP: Originally from CPAN #346 by Michael Guennewig

@DPATCH@
diff -urNad trunk~/Net/IMAP.pm trunk/Net/IMAP.pm
--- trunk~/Net/IMAP.pm	2006-05-13 20:42:29.000000000 +0300
+++ trunk/Net/IMAP.pm	2006-05-13 21:02:12.449073705 +0300
@@ -2204,6 +2204,11 @@
 
   $self->{Parent} = $parent;
 
+  if (!defined $str) {
+    $self->{Msgnums} = {};
+    return $self;
+  } 
+
   for my $item (split(/\s/, $str)) {
     $self->{Msgnums}{$item}++;
   }