summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Jetmore <jj33@pobox.com>2006-02-16 17:03:16 +0000
committerJohn Jetmore <jj33@pobox.com>2006-02-16 17:03:16 +0000
commit11121d3d3850fe51de5fbd23acbc0bb87fa082d6 (patch)
tree8800d5d9d5ba2737d7b60569edc0978aa8df3ade /src
parent3cd34f132a0cb73534aa479e16533771bc6cb6aa (diff)
exipick version 20060216.1
Diffstat (limited to 'src')
-rw-r--r--src/src/exipick.src29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/src/exipick.src b/src/src/exipick.src
index 52207e93b..e3967c382 100644
--- a/src/src/exipick.src
+++ b/src/src/exipick.src
@@ -1,5 +1,5 @@
#!PERL_COMMAND
-# $Cambridge: exim/src/src/exipick.src,v 1.8 2005/12/15 17:58:23 jetmore Exp $
+# $Cambridge: exim/src/src/exipick.src,v 1.9 2006/02/16 17:03:16 jetmore Exp $
# This variable should be set by the building process to Exim's spool directory.
my $spool = 'SPOOL_DIRECTORY';
@@ -8,10 +8,10 @@ use strict;
use Getopt::Long;
my($p_name) = $0 =~ m|/?([^/]+)$|;
-my $p_version = "20051215.3";
+my $p_version = "20060216.1";
my $p_usage = "Usage: $p_name [--help|--version] (see --help for details)";
my $p_cp = <<EOM;
- Copyright (c) 2003-2005 John Jetmore <jj33\@pobox.com>
+ Copyright (c) 2003-2006 John Jetmore <jj33\@pobox.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -97,7 +97,7 @@ foreach my $m (@$msg) {
&& !$G::msg_ids->{$m->{message}});
if (!$e->parse_message($m->{message})) {
warn "Couldn't parse $m->{message}: ".$e->error()."\n";
- next(MSG);
+ next MSG;
}
$tcount++;
my $match = 0;
@@ -119,19 +119,19 @@ foreach my $m (@$msg) {
}
if ($@) {
print STDERR "Error in eval '$c->{cmp}': $@\n";
- next(MSG);
+ next MSG;
} elsif ($ret) {
$match = 1;
- if ($G::or) { last(CRITERIA); }
- else { next(CRITERIA); }
+ if ($G::or) { last CRITERIA; }
+ else { next CRITERIA; }
} else { # no match
- if ($G::or) { next(CRITERIA); }
- else { next(MSG); }
+ if ($G::or) { next CRITERIA; }
+ else { next MSG; }
}
}
# skip this message if any criteria were supplied and it didn't match
- next(MSG) if ((scalar(@$crit) || scalar(@local_crit)) && !$match);
+ next MSG if ((scalar(@$crit) || scalar(@local_crit)) && !$match);
if ($count_only) {
$mcount++;
@@ -141,7 +141,7 @@ foreach my $m (@$msg) {
}
if ($G::mailq_bpc) {
- print "$tcount\n";
+ print "$mcount\n";
} elsif ($G::qgrep_c) {
print "$mcount matches out of $tcount messages\n";
}
@@ -610,7 +610,12 @@ sub _parse_header {
my $bytes = $_;
return(0) if (read(I, $_, $bytes) != $bytes);
chomp(); # may regret this later
- $self->{_vars}{message_linecount} += scalar(split(/\n/)) if ($t ne '*');
+ if ($t ne '*') {
+ # use of this temp variable is a little lame but it prevents a
+ # -w warning (Use of implicit split to @_ is deprecated)
+ my @t = split(/\n/);
+ $self->{_vars}{message_linecount} += scalar(@t);
+ }
# build the $header_ variable, following exim's rules (sort of)
if (/^([^ :]+):(.*)$/s) {
my $v = "header_" . lc($1);