This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libmail-deliverystatus-bounceparser-perl.

commit bfb48f173af60a7f60997b7dd1be8ce5cfe33fad
Author: gregor herrmann <[email protected]>
Date:   Thu Oct 23 22:55:22 2014 +0200

    Imported Upstream version 1.536
---
 Changes                                 |  9 ++++
 MANIFEST                                |  1 +
 README                                  |  6 ++-
 inc/Module/Install.pm                   |  6 +--
 inc/Module/Install/Base.pm              |  2 +-
 inc/Module/Install/Can.pm               | 85 ++++++++++++++++++++++++++++++---
 inc/Module/Install/Fetch.pm             |  2 +-
 inc/Module/Install/Makefile.pm          | 27 ++++++-----
 inc/Module/Install/Metadata.pm          | 29 ++++++-----
 inc/Module/Install/Win32.pm             |  2 +-
 inc/Module/Install/WriteAll.pm          |  2 +-
 lib/Mail/DeliveryStatus/BounceParser.pm |  4 +-
 t/corpus/warning-9.msg                  | 63 ++++++++++++++++++++++++
 t/warnings.t                            |  8 +++-
 14 files changed, 206 insertions(+), 40 deletions(-)

diff --git a/Changes b/Changes
index 056c5d7..2b1970b 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,14 @@
 Revision history for Perl extension Mail::DeliveryStatus::BounceParser.
 
+1.536   2014-10-22
+
+               Add missing file from previous release that was causing
+               failed tests
+
+1.535   2014-10-21
+
+           bug fix from [email protected]
+
 1.534   2013-03-26
 
                Added another spam detection case (mstevens)
diff --git a/MANIFEST b/MANIFEST
index c047eec..585c6c5 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -132,6 +132,7 @@ t/corpus/warning-5.msg
 t/corpus/warning-6.msg
 t/corpus/warning-7.msg
 t/corpus/warning-8.msg
+t/corpus/warning-9.msg
 t/corpus/yahoo-via-sendmail.unknown.msg
 t/corpus/yahoo-user-unknown.msg
 t/corpus/user-unknown-polish.msg
diff --git a/README b/README
index d94df4b..a3271b1 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Mail/DeliveryStatus/BounceParser version 1.534
+Mail/DeliveryStatus/BounceParser version 1.536
 ==============================================
 
 Mail::DeliveryStatus::BounceParser analyzes bounce messages and
@@ -39,6 +39,10 @@ COPYRIGHT AND LICENCE
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.
 
+REPOSITORY
+
+https://gitorious.org/mail-deliverystatus-bounceparser-fork
+
 AUTHOR
 
 Original author: Meng Weng Wong, [email protected]
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 8ee839d..4ecf46b 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
        # This is not enforced yet, but will be some time in the next few
        # releases once we can make sure it won't clash with custom
        # Module::Install extensions.
-       $VERSION = '1.00';
+       $VERSION = '1.06';
 
        # Storage for the pseudo-singleton
        $MAIN    = undef;
@@ -451,7 +451,7 @@ sub _version ($) {
 }
 
 sub _cmp ($$) {
-       _version($_[0]) <=> _version($_[1]);
+       _version($_[1]) <=> _version($_[2]);
 }
 
 # Cloned from Params::Util::_CLASS
@@ -467,4 +467,4 @@ sub _CLASS ($) {
 
 1;
 
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index b55bda3..802844a 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 71ccc27..22167b8 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -3,13 +3,12 @@ package Module::Install::Can;
 
 use strict;
 use Config                ();
-use File::Spec            ();
 use ExtUtils::MakeMaker   ();
 use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -29,7 +28,7 @@ sub can_use {
        eval { require $mod; $pkg->VERSION($ver || 0); 1 };
 }
 
-# check if we can run some command
+# Check if we can run some command
 sub can_run {
        my ($self, $cmd) = @_;
 
@@ -38,14 +37,88 @@ sub can_run {
 
        for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
                next if $dir eq '';
-               my $abs = File::Spec->catfile($dir, $_[1]);
+               require File::Spec;
+               my $abs = File::Spec->catfile($dir, $cmd);
                return $abs if (-x $abs or $abs = MM->maybe_command($abs));
        }
 
        return;
 }
 
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+       my $self = shift;
+
+       # Ensure we have the CBuilder module
+       $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+       # Do we have the configure_requires checker?
+       local $@;
+       eval "require ExtUtils::CBuilder;";
+       if ( $@ ) {
+               # They don't obey configure_requires, so it is
+               # someone old and delicate. Try to avoid hurting
+               # them by falling back to an older simpler test.
+               return $self->can_cc();
+       }
+
+       # Do we have a working C compiler
+       my $builder = ExtUtils::CBuilder->new(
+               quiet => 1,
+       );
+       unless ( $builder->have_compiler ) {
+               # No working C compiler
+               return 0;
+       }
+
+       # Write a C file representative of what XS becomes
+       require File::Temp;
+       my ( $FH, $tmpfile ) = File::Temp::tempfile(
+               "compilexs-XXXXX",
+               SUFFIX => '.c',
+       );
+       binmode $FH;
+       print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+    return 0;
+}
+
+int boot_sanexs() {
+    return 1;
+}
+
+END_C
+       close $FH;
+
+       # Can the C compiler access the same headers XS does
+       my @libs   = ();
+       my $object = undef;
+       eval {
+               local $^W = 0;
+               $object = $builder->compile(
+                       source => $tmpfile,
+               );
+               @libs = $builder->link(
+                       objects     => $object,
+                       module_name => 'sanexs',
+               );
+       };
+       my $result = $@ ? 0 : 1;
+
+       # Clean up all the build files
+       foreach ( $tmpfile, $object, @libs ) {
+               next unless defined $_;
+               1 while unlink;
+       }
+
+       return $result;
+}
+
+# Can we locate a (the) C compiler
 sub can_cc {
        my $self   = shift;
        my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@ if ( $^O eq 'cygwin' ) {
 
 __END__
 
-#line 156
+#line 236
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index ec1f106..bee0c4f 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 5dfd0e9..7052f36 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -215,18 +215,22 @@ sub write {
        require ExtUtils::MakeMaker;
 
        if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
-               # MakeMaker can complain about module versions that include
-               # an underscore, even though its own version may contain one!
-               # Hence the funny regexp to get rid of it.  See RT #35800
-               # for details.
-               my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
-               $self->build_requires(     'ExtUtils::MakeMaker' => $v );
-               $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+               # This previous attempted to inherit the version of
+               # ExtUtils::MakeMaker in use by the module author, but this
+               # was found to be untenable as some authors build releases
+               # using future dev versions of EU:MM that nobody else has.
+               # Instead, #toolchain suggests we use 6.59 which is the most
+               # stable version on CPAN at time of writing and is, to quote
+               # ribasushi, "not terminally fucked, > and tested enough".
+               # TODO: We will now need to maintain this over time to push
+               # the version up as new versions are released.
+               $self->build_requires(     'ExtUtils::MakeMaker' => 6.59 );
+               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
        } else {
                # Allow legacy-compatibility with 5.005 by depending on the
                # most recent EU:MM that supported 5.005.
-               $self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
-               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+               $self->build_requires(     'ExtUtils::MakeMaker' => 6.36 );
+               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
        }
 
        # Generate the MakeMaker params
@@ -241,7 +245,6 @@ in a module, and provide its file path via 'version_from' 
(or
 'all_from' if you prefer) in Makefile.PL.
 EOT
 
-       $DB::single = 1;
        if ( $self->tests ) {
                my @tests = split ' ', $self->tests;
                my %seen;
@@ -412,4 +415,4 @@ sub postamble {
 
 __END__
 
-#line 541
+#line 544
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index cfe45b3..58430f3 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -151,15 +151,21 @@ sub install_as_site   { $_[0]->installdirs('site')   }
 sub install_as_vendor { $_[0]->installdirs('vendor') }
 
 sub dynamic_config {
-       my $self = shift;
-       unless ( @_ ) {
-               warn "You MUST provide an explicit true/false value to 
dynamic_config\n";
-               return $self;
+       my $self  = shift;
+       my $value = @_ ? shift : 1;
+       if ( $self->{values}->{dynamic_config} ) {
+               # Once dynamic we never change to static, for safety
+               return 0;
        }
-       $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+       $self->{values}->{dynamic_config} = $value ? 1 : 0;
        return 1;
 }
 
+# Convenience command
+sub static_config {
+       shift->dynamic_config(0);
+}
+
 sub perl_version {
        my $self = shift;
        return $self->{values}->{perl_version} unless @_;
@@ -170,7 +176,7 @@ sub perl_version {
        # Normalize the version
        $version = $self->_perl_version($version);
 
-       # We don't support the reall old versions
+       # We don't support the really old versions
        unless ( $version >= 5.005 ) {
                die "Module::Install only supports 5.005 or newer (use 
ExtUtils::MakeMaker)\n";
        }
@@ -515,6 +521,7 @@ sub __extract_license {
                'GNU Free Documentation license'     => 'unrestricted', 1,
                'GNU Affero General Public License'  => 'open_source',  1,
                '(?:Free)?BSD license'               => 'bsd',          1,
+               'Artistic license 2\.0'              => 'artistic_2',   1,
                'Artistic license'                   => 'artistic',     1,
                'Apache (?:Software )?license'       => 'apache',       1,
                'GPL'                                => 'gpl',          1,
@@ -550,9 +557,9 @@ sub license_from {
 
 sub _extract_bugtracker {
        my @links   = $_[0] =~ m#L<(
-        \Qhttp://rt.cpan.org/\E[^>]+|
-        \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
-        \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+        https?\Q://rt.cpan.org/\E[^>]+|
+        https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+        https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
         )>#gx;
        my %links;
        @links{@links}=();
@@ -581,7 +588,7 @@ sub bugtracker_from {
 sub requires_from {
        my $self     = shift;
        my $content  = Module::Install::_readperl($_[0]);
-       my @requires = $content =~ 
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+       my @requires = $content =~ 
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
        while ( @requires ) {
                my $module  = shift @requires;
                my $version = shift @requires;
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index edc18b4..eeaa3fe 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index d0f6599..85d8018 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.00';
+       $VERSION = '1.06';
        @ISA     = qw{Module::Install::Base};
        $ISCORE  = 1;
 }
diff --git a/lib/Mail/DeliveryStatus/BounceParser.pm 
b/lib/Mail/DeliveryStatus/BounceParser.pm
index b414678..dd74787 100644
--- a/lib/Mail/DeliveryStatus/BounceParser.pm
+++ b/lib/Mail/DeliveryStatus/BounceParser.pm
@@ -42,7 +42,7 @@ use 5.006;
 use strict;
 use warnings;
 
-our $VERSION = '1.534';
+our $VERSION = '1.536';
 $VERSION = eval $VERSION;
 
 use MIME::Parser;
@@ -1327,7 +1327,7 @@ sub _analyze_smtp_transcripts {
   for (split /\n\n|(?=>>>)/, $plain_smtp_transcript) {
     $email = _cleanup_email($1) if /RCPT TO:\s*(\S+)/im;
 
-    if 
(/The\s+following\s+addresses\s+had\s+permanent\s+fatal\s+errors\s+-----\s+\<(.*)\>/im)
 {
+    if 
(/The\s+following\s+addresses\s+had\s+permanent\s+fatal\s+errors\s+-----\s+\<?(.*)\>?/im)
 {
       $email = _cleanup_email($1);
     }
 
diff --git a/t/corpus/warning-9.msg b/t/corpus/warning-9.msg
new file mode 100644
index 0000000..71d37d0
--- /dev/null
+++ b/t/corpus/warning-9.msg
@@ -0,0 +1,63 @@
+From MAILER-DAEMON Tue Oct 14 03:34:15 2014
+Return-path: <>
+Envelope-to: [email protected]
+Delivery-date: Tue, 14 Oct 2014 03:34:15 +0100
+Received: from anchor-internal-1.mail.demon.net ([195.173.56.100])
+       by list.example.co.uk with esmtp (Exim 4.80)
+       id 1XdrwF-0001iU-9S
+       for [email protected]; Tue, 14 Oct 2014 03:34:15 +0100
+Received: from localhost (localhost)
+       by anchor-internal-1.mail.demon.net id s9E2YFir022140Tue, 14 Oct 2014 
02:34:15 GMT
+Date: Tue, 14 Oct 2014 02:34:15 GMT
+From: Mail Delivery Subsystem <[email protected]>
+Message-Id: <[email protected]>
+To: <[email protected]>
+Subject: Returned mail: see transcript for details
+Auto-Submitted: auto-generated (failure)
+
+The original message was received at Tue, 14 Oct 2014 02:34:14 GMT
+from anchor-hub-2.mail.demon.net [194.217.242.72]
+
+   ----- The following addresses had permanent fatal errors -----
[email protected]
+    (reason: 553 Sender Policy Framework (SPF) fail)
+    (expanded from: <[email protected]>)
+
+   ----- Transcript of session follows -----
+... while talking to cluster5.eu.messagelabs.com.:
+>>> DATA
+<<< 553 Sender Policy Framework (SPF) fail
+550 5.1.1 [email protected]... User unknown
+<<< 503 RCPT first (#5.5.1)
+
+   ----- Message header follows -----
+
+Return-Path: <[email protected]>
+Received: from anchor-hub.mail.demon.net (anchor-hub-2.mail.demon.net 
[194.217.242.72])
+       by anchor-internal-1.mail.demon.net with ESMTP id s9E2YEir022139;
+       Tue, 14 Oct 2014 02:34:14 GMT
+Received: from [90.91.92.93] (helo=list.example.co.uk)
+       by anchor-hub.mail.demon.net with esmtp id 1XdrwE-0004jz-MM
+       for [email protected]; Tue, 14 Oct 2014 02:34:14 +0000
+Received: from localhost.localdomain ([127.0.0.1] helo=list.example.co.uk)
+       by list.example.co.uk with esmtp (Exim 4.80)
+       (envelope-from <[email protected]>)
+       id 1XdrvQ-0003tw-CN
+       for [email protected]; Tue, 14 Oct 2014 03:33:24 +0100
+Content-Disposition: inline
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain; charset="ISO-8859-15"
+MIME-Version: 1.0
+X-Mailer: MIME::Lite 3.028 (F2.82; T1.35; A2.09; B3.13; Q3.13)
+Subject: Coming in to land tomorrow [Tue Oct 14 2014]
+X-Auto-Response-Suppress: OOF
+Date: Tue, 14 Oct 2014 03:33:24 +0100
+List-Id: <list.example.co.uk>
+Precedence: list
+To: Gail Windy <[email protected]>
+From: The Register <[email protected]>
+Message-Id: <[email protected]>
+X-CNFS-Analysis: v=1.0 c=1
+
+   ----- Message body suppressed -----
+
diff --git a/t/warnings.t b/t/warnings.t
index be48e52..5b8b1e4 100644
--- a/t/warnings.t
+++ b/t/warnings.t
@@ -1,7 +1,7 @@
 #!perl -wT
 use strict;
 
-use Test::More tests => 22;
+use Test::More tests => 23;
 
 use Mail::DeliveryStatus::BounceParser;
 
@@ -104,3 +104,9 @@ isa_ok($bounce8, 'Mail::DeliveryStatus::BounceParser');
 
 # it's not a bounce - transient nonfatal error
 ok(!$bounce8->is_bounce, "This is a bounce");
+
+# a bounce without < and > surrounding address
+my $message9 = readfile('t/corpus/warning-9.msg');
+my $bounce9 = Mail::DeliveryStatus::BounceParser->new($message9);
+my $addresses = scalar $bounce9->addresses;
+ok( $addresses >= 1, 'Found at least one email address in message' );

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmail-deliverystatus-bounceparser-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to