Hello community,
here is the log from the commit of package perl-Email-Address for
openSUSE:Factory checked in at 2013-06-07 06:59:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Email-Address (Old)
and /work/SRC/openSUSE:Factory/.perl-Email-Address.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Email-Address"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Email-Address/perl-Email-Address.changes
2011-11-14 13:20:17.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Email-Address.new/perl-Email-Address.changes
2013-06-07 06:59:25.000000000 +0200
@@ -1,0 +2,19 @@
+Tue Jun 4 08:41:18 UTC 2013 - [email protected]
+
+- updated to 1.898
+ remove dead link
+
+ skip mailboxes, rather than aborting the whole parse, when
+ encountering non-ASCII characters (thanks, Ruslan Zakirov!)
+
+ improve the behavior of escaping in phrases (thanks, Ruslan Zakirov!)
+
+ documentation improvements (thanks, Glenn Fowler!)
+
+ allow non-ASCII *only in phrase*
+
+ note that the use of the regex vars is not a great idea
+
+ reject any non-ascii content in strings
+
+-------------------------------------------------------------------
Old:
----
Email-Address-1.892.tar.gz
New:
----
Email-Address-1.898.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Email-Address.spec ++++++
--- /var/tmp/diff_new_pack.mgXhPd/_old 2013-06-07 06:59:26.000000000 +0200
+++ /var/tmp/diff_new_pack.mgXhPd/_new 2013-06-07 06:59:26.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Email-Address
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,42 +15,30 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
-%bcond_with pod
Name: perl-Email-Address
+Version: 1.898
+Release: 0
%define cpan_name Email-Address
Summary: RFC 2822 Address Parsing and Creation
-Version: 1.892
-Release: 1
-License: GPL-1.0+ or Artistic-1.0
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Email-Address/
-Source:
http://www.cpan.org/authors/id/R/RJ/RJBS/Email-Address-1.892.tar.gz
+Source:
http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
-%if %{with pod}
-BuildRequires: perl(Test::Pod) >= 1.14
-BuildRequires: perl(Test::Pod::Coverage) >= 1.08
-%endif
-BuildRequires: perl(Test::More) >= 0.47
-#
+#BuildRequires: perl(Email::Address)
+#BuildRequires: perl(Mail::Address)
+%{perl_requires}
%description
This class implements a regex-based RFC 2822 parser that locates email
addresses in strings and returns a list of 'Email::Address' objects found.
-Alternatley you may construct objects manually. The goal of this software
+Alternatively you may construct objects manually. The goal of this software
is to be correct, and very very fast.
-Authors:
---------
- Originally by Casey West, <[email protected]_>.
- Maintained, 2006-2007, Ricardo SIGNES <[email protected]_>.
-
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -63,24 +51,11 @@
%install
%perl_make_install
-### since 11.4 perl_process_packlist
-### removes .packlist, perllocal.pod files
-%if 0%{?suse_version} > 1130
%perl_process_packlist
-%else
-# do not perl_process_packlist
-# remove .packlist file
-%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
-# remove perllocal.pod file
-%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod
-%endif
%perl_gen_filelist
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
%files -f %{name}.files
-%defattr(-,root,root,-)
+%defattr(-,root,root,755)
%doc Changes LICENSE README
%changelog
++++++ Email-Address-1.892.tar.gz -> Email-Address-1.898.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/Changes
new/Email-Address-1.898/Changes
--- old/Email-Address-1.892/Changes 2010-09-04 00:51:37.000000000 +0200
+++ new/Email-Address-1.898/Changes 2013-02-07 22:40:56.000000000 +0100
@@ -1,5 +1,26 @@
Release history for Email-Address
+1.898 2013-02-07
+ remove dead link
+
+1.897 2012-12-17
+ skip mailboxes, rather than aborting the whole parse, when
+ encountering non-ASCII characters (thanks, Ruslan Zakirov!)
+
+ improve the behavior of escaping in phrases (thanks, Ruslan Zakirov!)
+
+1.896 2012-07-31
+ documentation improvements (thanks, Glenn Fowler!)
+
+1.895 2012-01-15
+ allow non-ASCII *only in phrase*
+
+1.894 2012-01-14
+ note that the use of the regex vars is not a great idea
+
+1.893 2012-01-02
+ reject any non-ascii content in strings
+
1.892 2010-09-02
revert all behavior to 1.889
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/MANIFEST
new/Email-Address-1.898/MANIFEST
--- old/Email-Address-1.892/MANIFEST 2010-09-04 01:45:17.000000000 +0200
+++ new/Email-Address-1.898/MANIFEST 2013-02-07 22:41:14.000000000 +0100
@@ -6,6 +6,7 @@
Makefile.PL
MANIFEST This list of files
README
+t/ascii.t
t/cache-cow.t
t/format.t
t/pod.t
@@ -14,4 +15,5 @@
t/quoting.t
t/tests.t
LICENSE
-META.yml Module meta-data (added by MakeMaker)
+META.yml Module YAML meta-data (added by
MakeMaker)
+META.json Module JSON meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/META.json
new/Email-Address-1.898/META.json
--- old/Email-Address-1.892/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Email-Address-1.898/META.json 2013-02-07 22:41:14.000000000 +0100
@@ -0,0 +1,41 @@
+{
+ "abstract" : "RFC 2822 Address Parsing",
+ "author" : [
+ "Casey West <[email protected]>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter
version 2.120921",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Email-Address",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Test::More" : "0.47"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "1.898"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/META.yml
new/Email-Address-1.898/META.yml
--- old/Email-Address-1.892/META.yml 2010-09-04 01:45:17.000000000 +0200
+++ new/Email-Address-1.898/META.yml 2013-02-07 22:41:14.000000000 +0100
@@ -1,22 +1,22 @@
---- #YAML:1.0
-name: Email-Address
-version: 1.892
-abstract: RFC 2822 Address Parsing
+---
+abstract: 'RFC 2822 Address Parsing'
author:
- - Casey West <[email protected]>
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+ - 'Casey West <[email protected]>'
build_requires:
- ExtUtils::MakeMaker: 0
-requires:
- Test::More: 0.47
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.56
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version
2.120921'
+license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Email-Address
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ Test::More: 0.47
+version: 1.898
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/README
new/Email-Address-1.898/README
--- old/Email-Address-1.892/README 2010-09-04 00:51:37.000000000 +0200
+++ new/Email-Address-1.898/README 2013-02-07 22:41:02.000000000 +0100
@@ -1,5 +1,5 @@
NAME
- Email::Address 1.892 - RFC 2822 Address Parsing and Creation
+ Email::Address 1.898 - RFC 2822 Address Parsing and Creation
SYNOPSIS
use Email::Address;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/lib/Email/Address.pm
new/Email-Address-1.898/lib/Email/Address.pm
--- old/Email-Address-1.892/lib/Email/Address.pm 2010-09-04
00:51:37.000000000 +0200
+++ new/Email-Address-1.898/lib/Email/Address.pm 2013-02-07
22:41:02.000000000 +0100
@@ -10,7 +10,7 @@
my $NOCACHE;
-$VERSION = '1.892';
+$VERSION = '1.898';
$COMMENT_NEST_LEVEL ||= 2;
$STRINGIFY ||= 'format';
$COLLAPSE_SPACES = 1 unless defined $COLLAPSE_SPACES; # who wants //=? me!
@@ -30,14 +30,14 @@
=head1 VERSION
-version 1.892
+version 1.898
=head1 DESCRIPTION
This class implements a regex-based RFC 2822 parser that locates email
addresses in strings and returns a list of C<Email::Address> objects found.
-Alternatley you may construct objects manually. The goal of this software is to
-be correct, and very very fast.
+Alternatively you may construct objects manually. The goal of this software is
+to be correct, and very very fast.
=cut
@@ -94,6 +94,13 @@
=head2 Package Variables
+B<ACHTUNG!> Email isn't easy (if even possible) to parse with a regex, I<at
+least> if you're on a C<perl> prior to 5.10.0. Providing regular expressions
+for use by other programs isn't a great idea, because it makes it hard to
+improve the parser without breaking the "it's a regex" feature. Using these
+regular expressions is not encouraged, and methods like C<<
+Email::Address->is_addr_spec >> should be provided in the future.
+
Several regular expressions used in this package are useful to others.
For convenience, these variables are declared as package variables that
you may access from your program.
@@ -120,12 +127,12 @@
=item $Email::Address::name_addr
This regular expression defines what an email address can look like
-with an optional preceeding display name, also known as the C<phrase>.
+with an optional preceding display name, also known as the C<phrase>.
=item $Email::Address::mailbox
This is the complete regular expression defining an RFC 2822 emial
-address with an optional preceeding display name and optional
+address with an optional preceding display name and optional
following comment.
=back
@@ -165,7 +172,7 @@
$Email::Address::COMMENT_NEST_LEVEL = 10; # I'm deep
-The reason for this hardly limiting limitation is simple: efficiency.
+The reason for this hardly-limiting limitation is simple: efficiency.
Long strings of whitespace can be problematic for this module to parse, a bug
which has not yet been adequately addressed. The default behavior is now to
@@ -173,6 +180,10 @@
prevent this behavior, set C<$Email::Address::COLLAPSE_SPACES> to zero. This
variable will go away when the bug is resolved properly.
+In accordance with RFC 822 and its descendants, this module demands that email
+addresses be ASCII only. Any non-ASCII content in the parsed addresses will
+cause the parser to return no results.
+
=cut
sub __get_cached_parse {
@@ -181,12 +192,12 @@
my ($class, $line) = @_;
return @{$PARSE_CACHE{$line}} if exists $PARSE_CACHE{$line};
- return;
+ return;
}
sub __cache_parse {
return if $NOCACHE;
-
+
my ($class, $line, $addrs) = @_;
$PARSE_CACHE{$line} = $addrs;
@@ -217,6 +228,9 @@
($user, $host) = ($1, $2);
}
+ next if $user =~ /\P{ASCII}/;
+ next if $host =~ /\P{ASCII}/;
+
my ($phrase) = /($display_name)/o;
for ( $phrase, $host, $user, @comments ) {
@@ -266,7 +280,7 @@
One way this module stays fast is with internal caches. Caches live
in memory and there is the remote possibility that you will have a
-memory problem. In the off chance that you think you're one of those
+memory problem. On the off chance that you think you're one of those
people, this class method will empty those caches.
I've loaded over 12000 objects and not encountered a memory problem.
@@ -285,7 +299,9 @@
Email::Address->disable_cache if memory_low();
-If you'd rather not cache address parses at all, you can disable (and
reenable) the Email::Address cache with these methods. The cache is enabled by
default.
+If you'd rather not cache address parses at all, you can disable (and
+re-enable) the Email::Address cache with these methods. The cache is enabled
+by default.
=cut
@@ -364,7 +380,7 @@
if ($_[1]) {
if ($_[0][_IN_CACHE]) {
my $replicant = bless [ @{$_[0]} ] => ref $_[0];
- $PARSE_CACHE{ ${ $_[0][_IN_CACHE][0] } }[ $_[0][_IN_CACHE][1] ]
+ $PARSE_CACHE{ ${ $_[0][_IN_CACHE][0] } }[ $_[0][_IN_CACHE][1] ]
= $replicant;
$_[0][_IN_CACHE] = undef;
}
@@ -425,7 +441,7 @@
return $phrase if $phrase =~ /\A=\?.+\?=\z/;
$phrase =~ s/\A"(.+)"\z/$1/;
- $phrase =~ s/\"/\\"/g;
+ $phrase =~ s/([\\"])/\\$1/g;
return qq{"$phrase"};
}
@@ -486,13 +502,16 @@
don't.
{
- local $Email::Address::STRINGIFY = 'address';
+ local $Email::Address::STRINGIFY = 'host';
print "I have your address, $address.";
# geeknest.com
}
print "I have your address, $address.";
# "Casey West" <[email protected]>
+Modifying this package variable is now deprecated. Subclassing is now the
+recommended approach.
+
=cut
sub as_string {
@@ -518,7 +537,7 @@
On his 1.8GHz Apple MacBook, rjbs gets these results:
- $ perl -Ilib bench/ea-vs-ma.pl bench/corpus.txt 5
+ $ perl -Ilib bench/ea-vs-ma.pl bench/corpus.txt 5
Rate Mail::Address Email::Address
Mail::Address 2.59/s -- -44%
Email::Address 4.59/s 77% --
@@ -537,12 +556,6 @@
certain known characteristics, and disabling cache will also degrade
performance.
-=head1 PERL EMAIL PROJECT
-
-This module is maintained by the Perl Email Project
-
-L<http://emailproject.perl.org/wiki/Email::Address>
-
=head1 SEE ALSO
L<Email::Simple>, L<perl>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/t/ascii.t
new/Email-Address-1.898/t/ascii.t
--- old/Email-Address-1.892/t/ascii.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Email-Address-1.898/t/ascii.t 2012-12-17 16:12:28.000000000 +0100
@@ -0,0 +1,59 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+use Email::Address;
+use Encode qw(decode);
+
+my $ascii = q{[email protected]};
+my $utf_8 = q{а[email protected]};
+my $text = decode('utf-8', $utf_8, Encode::LEAVE_SRC);
+
+my $ok_mixed = qq{"$text" <$ascii>};
+my $bad_mixed = qq{"$text" <$text>};
+
+{
+ my (@addr) = Email::Address->parse($ascii);
+ is(@addr, 1, "an ascii address is a-ok");
+
+ # ok( $ascii =~ $Email::Address::addr_spec, "...it =~ addr_spec");
+}
+
+{
+ my (@addr) = Email::Address->parse($ok_mixed);
+ is(@addr, 1, "a quoted non-ascii phrase is a-ok with ascii email");
+}
+
+{
+ my (@addr) = Email::Address->parse($bad_mixed);
+ is(@addr, 0, "a quoted non-ascii phrase is not okay with non-ascii email");
+}
+
+{
+ my (@addr) = Email::Address->parse($utf_8);
+ is(@addr, 0, "utf-8 octet address: not ok");
+
+ # ok( $utf_8 !~ $Email::Address::addr_spec, "...it !~ addr_spec");
+}
+
+{
+ my (@addr) = Email::Address->parse($text);
+ is(@addr, 0, "unicode (decoded) address: not ok");
+
+ # ok( $text =~ $Email::Address::addr_spec, "...it !~ addr_spec");
+}
+
+{
+ my @addr = Email::Address->parse(qq{
+ "Not ascii phras\x{e9}" <good\@email>,
+ b\x{e3}d\@user,
+ bad\@d\x{f6}main,
+ not.bad\@again
+ });
+ is scalar @addr, 2, "correct number of good emails";
+ is "$addr[0]", qq{"Not ascii phras\x{e9}" <good\@email>}, "expected email";
+ is "$addr[1]", qq{not.bad\@again}, "expected email";
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/t/pod-coverage.t
new/Email-Address-1.898/t/pod-coverage.t
--- old/Email-Address-1.892/t/pod-coverage.t 2008-11-21 22:34:40.000000000
+0100
+++ new/Email-Address-1.898/t/pod-coverage.t 2012-08-01 05:06:34.000000000
+0200
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
use Test::More;
eval "use Test::Pod::Coverage 1.08";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/t/pod.t
new/Email-Address-1.898/t/pod.t
--- old/Email-Address-1.892/t/pod.t 2008-11-21 22:34:40.000000000 +0100
+++ new/Email-Address-1.898/t/pod.t 2012-08-01 05:06:31.000000000 +0200
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
use Test::More;
eval "use Test::Pod 1.14";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/t/quoting.t
new/Email-Address-1.898/t/quoting.t
--- old/Email-Address-1.892/t/quoting.t 2010-09-04 00:41:14.000000000 +0200
+++ new/Email-Address-1.898/t/quoting.t 2012-12-17 16:12:13.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
use Email::Address;
-use Test::More tests => 6;
+use Test::More tests => 8;
my $phrase = q{jack!work};
my $email = '[email protected]';
@@ -36,3 +36,9 @@
);
is($ea3->phrase, $phrase, "the phrase method returns the right thing");
+
+{
+ my $ea = Email::Address->new(q{jack "\\" robinson}, '[email protected]');
+ is $ea->phrase, q{jack "\\" robinson};
+ is $ea->format, q{"jack \\"\\\\\\" robinson" <[email protected]>};
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Email-Address-1.892/t/tests.t
new/Email-Address-1.898/t/tests.t
--- old/Email-Address-1.892/t/tests.t 2010-09-04 00:51:37.000000000 +0200
+++ new/Email-Address-1.898/t/tests.t 2012-12-17 16:12:13.000000000 +0100
@@ -1,6 +1,6 @@
use Test::More;
use strict;
-$^W = 1;
+use warnings;
# This is a corpus of addresses to test. Each element of @list is a pair of
# input and expected output. The input is a string that will be given to
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]