r9622 - in /branches/upstream/libregexp-common-email-address-perl: ./ current/ current/lib/ current/lib/Regexp/ current/lib/Regexp/Common/ current/lib/Regexp/Common/Email/ current/t/

emhn-guest at users.alioth.debian.org emhn-guest at users.alioth.debian.org
Tue Nov 20 01:03:40 UTC 2007


Author: emhn-guest
Date: Tue Nov 20 01:03:40 2007
New Revision: 9622

URL: http://svn.debian.org/wsvn/?sc=1&rev=9622
Log:
[svn-inject] Installing original source of libregexp-common-email-address-perl

Added:
    branches/upstream/libregexp-common-email-address-perl/
    branches/upstream/libregexp-common-email-address-perl/current/
    branches/upstream/libregexp-common-email-address-perl/current/Changes
    branches/upstream/libregexp-common-email-address-perl/current/MANIFEST
    branches/upstream/libregexp-common-email-address-perl/current/META.yml
    branches/upstream/libregexp-common-email-address-perl/current/Makefile.PL
    branches/upstream/libregexp-common-email-address-perl/current/README
    branches/upstream/libregexp-common-email-address-perl/current/lib/
    branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/
    branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/
    branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/
    branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/Address.pm
    branches/upstream/libregexp-common-email-address-perl/current/t/
    branches/upstream/libregexp-common-email-address-perl/current/t/test.t

Added: branches/upstream/libregexp-common-email-address-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/Changes?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/Changes (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/Changes Tue Nov 20 01:03:40 2007
@@ -1,0 +1,4 @@
+1.01    2005-01-05
+
+  - Initial version.
+

Added: branches/upstream/libregexp-common-email-address-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/MANIFEST?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/MANIFEST (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/MANIFEST Tue Nov 20 01:03:40 2007
@@ -1,0 +1,7 @@
+Changes
+lib/Regexp/Common/Email/Address.pm
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+README
+t/test.t

Added: branches/upstream/libregexp-common-email-address-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/META.yml?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/META.yml (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/META.yml Tue Nov 20 01:03:40 2007
@@ -1,0 +1,13 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
+name:         Regexp-Common-Email-Address
+version:      1.01
+version_from: lib/Regexp/Common/Email/Address.pm
+installdirs:  site
+requires:
+    Email::Address:                1.80
+    Regexp::Common:                2.119
+    Test::More:                    0.47
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.24

Added: branches/upstream/libregexp-common-email-address-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/Makefile.PL?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/Makefile.PL (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/Makefile.PL Tue Nov 20 01:03:40 2007
@@ -1,0 +1,13 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile (
+               AUTHOR        => 'Casey West <casey at geeknest.com>',
+               ABSTRACT      => "Returns a pattern for Email Addresses",
+               NAME          => 'Regexp::Common::Email::Address',
+               PREREQ_PM     => {
+                                 'Email::Address' => '1.80',
+                                 'Regexp::Common' => '2.119',
+                                 'Test::More' => '0.47',
+                                },
+               VERSION_FROM  => 'lib/Regexp/Common/Email/Address.pm',
+              );

Added: branches/upstream/libregexp-common-email-address-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/README?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/README (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/README Tue Nov 20 01:03:40 2007
@@ -1,0 +1,34 @@
+NAME
+    Regexp::Common::Email::Address - Returns a pattern for Email Addresses
+
+SYNOPSIS
+      use Regexp::Common qw[Email::Address];
+      use Email::Address;
+
+      while (<>) {
+          my (@found) = /($RE{Email}{Address})/g;
+          my (@addrs) = map $_->address,
+                            Email::Address->parse("@found");
+          print "X-Addresses: ",
+                join(", ", @addrs),
+                "\n";
+      }
+
+DESCRIPTION
+  $RE{Email}{Address}
+    Provides a regex to match email addresses as defined by RFC 2822. Under
+    "{-keep}", the entire match is kept as $1. If you want to parse that
+    further then pass it to "Email::Address->parse()". Don't worry, it's
+    fast.
+
+SEE ALSO
+    Email::Address, Regexp::Common, perl.
+
+AUTHOR
+    Casey West, <casey at geeknest.com>.
+
+COPYRIGHT
+      Copyright (c) 2005 Casey West.  All rights reserved.
+      This module is free software; you can redistribute it and/or modify it
+      under the same terms as Perl itself.
+

Added: branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/Address.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/Address.pm?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/Address.pm (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/lib/Regexp/Common/Email/Address.pm Tue Nov 20 01:03:40 2007
@@ -1,0 +1,61 @@
+package Regexp::Common::Email::Address;
+# $Id: Address.pm,v 1.1 2005/01/06 16:10:10 cwest Exp $
+use strict;
+
+use vars qw[$VERSION];
+$VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.1 $)[1];
+
+use Regexp::Common qw[pattern];
+use Email::Address;
+
+pattern name   => [qw[Email Address]],
+        create => qq[(?k:$Email::Address::mailbox)];
+
+1;
+
+__END__
+
+=head1 NAME
+
+Regexp::Common::Email::Address - Returns a pattern for Email Addresses
+
+=head1 SYNOPSIS
+
+  use Regexp::Common qw[Email::Address];
+  use Email::Address;
+
+  while (<>) {
+      my (@found) = /($RE{Email}{Address})/g;
+      my (@addrs) = map $_->address,
+                        Email::Address->parse("@found");
+      print "X-Addresses: ",
+            join(", ", @addrs),
+            "\n";
+  }
+
+=head1 DESCRIPTION
+
+=head2 C<$RE{Email}{Address}>
+
+Provides a regex to match email addresses as defined by RFC 2822. Under
+C<{-keep}>, the entire match is kept as C<$1>. If you want to parse that
+further then pass it to C<< Email::Address->parse() >>. Don't worry,
+it's fast.
+
+=head1 SEE ALSO
+
+L<Email::Address>,
+L<Regexp::Common>,
+L<perl>.
+
+=head1 AUTHOR
+
+Casey West, <F<casey at geeknest.com>>.
+
+=head1 COPYRIGHT
+
+  Copyright (c) 2005 Casey West.  All rights reserved.
+  This module is free software; you can redistribute it and/or modify it
+  under the same terms as Perl itself.
+
+=cut

Added: branches/upstream/libregexp-common-email-address-perl/current/t/test.t
URL: http://svn.debian.org/wsvn/branches/upstream/libregexp-common-email-address-perl/current/t/test.t?rev=9622&op=file
==============================================================================
--- branches/upstream/libregexp-common-email-address-perl/current/t/test.t (added)
+++ branches/upstream/libregexp-common-email-address-perl/current/t/test.t Tue Nov 20 01:03:40 2007
@@ -1,0 +1,20 @@
+use Test::More tests => 7;
+use strict;
+$^W = 1;
+
+BEGIN { use_ok 'Regexp::Common', 'Email::Address' };
+use_ok 'Email::Address';
+
+my $valid   = q[Casey West <casey at geeknest.com>];
+my $invalid = q[@bar.com];
+
+ok  $valid   =~ /$RE{Email}{Address}/, 'valid is valid';
+ok !($invalid =~ /$RE{Email}{Address}/), 'invalid is invalid';
+
+$valid =~ /$RE{Email}{Address}{-keep}/;
+is $1, $valid, 'matches is the same';
+
+my ($address) = Email::Address->parse($1);
+is $address->phrase, 'Casey West', 'parsed address returned';
+is $address->address, 'casey at geeknest.com', 'parsed address returned';
+




More information about the Pkg-perl-cvs-commits mailing list