use folderlist from @ARGV only if @ARGV actually contains at least one foldername Mail::IMAPClient
authorMatthias Förste foerste@schlittermann.de
Wed, 09 Nov 2011 21:01:20 +0100
branchMail::IMAPClient
changeset 9 b420079cbad2
parent 8 262cfae21b61
child 10 d01a8cd90e33
use folderlist from @ARGV only if @ARGV actually contains at least one foldername
isearch
--- a/isearch	Wed Nov 09 16:57:34 2011 +0100
+++ b/isearch	Wed Nov 09 21:01:20 2011 +0100
@@ -76,7 +76,7 @@
 my $imap = Mail::IMAPClient->new(%imapopts)
   or die "Could not connect to IMAP server\n";
 
-my $f = ([@ARGV] or $imap->folders);
+my $f = @ARGV ? [@ARGV] : $imap->folders;
 die "Can't get folderlist: " . $imap->LastError . "\n" unless $f;
 
 my $mids;