Re: perlfaq9 vs. RFC2822
[email protected] (Steve Peters) Tue, 24 Mar 2009 12:54:26 -0500
| Newsgroups | perl.perlfaq.workers,perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 19, 2009 at 3:49 PM, Dan Kogai <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Porters, > > On 20 Mar 2009, at 05:14, Dan Kogai wrote: >> >> % diff -u pod/perlfaq9.pod.orig pod/perlfaq9.pod >> - --- pod/perlfaq9.pod.orig =A0 =A0 2008-12-19 18:13:58.000000000 +0900 >> +++ pod/perlfaq9.pod =A0 =A02009-03-20 05:08:26.000000000 +0900 >> @@ -433,7 +433,7 @@ >> =A0 =A0my $dot_atom =A0 =3D qr{$atom(?:\.$atom)*}; >> =A0 =A0my $quoted =A0 =A0 =3D qr{"(?:\\[^\r\n]|[^\\"])*"}; >> =A0 =A0my $local =A0 =A0 =A0=3D qr{(?:$dot_atom|$quoted)}; >> - - =A0 =A0my $domain_lit =3D qr{\[(?:\\\S|[\x21-\x5a\x5e-\x7e])*\]}; >> + =A0 =A0my $domain_lit =3D qr{\[(?:\\[^\r\n]|[\x21-\x5a\x5e-\x7e])*\]}; >> =A0 =A0my $domain =A0 =A0 =3D qr{(?:$dot_atom|$domain_lit)}; >> =A0 =A0my $addr_spec =A0=3D qr{$local\@$domain}; > > Ahem. =A0That one might act funny if non-ascii char is present in the str= ing. > =A0The patch below is better. > > Dan the Irregular Expressionist > > - --- pod/perlfaq9.pod.orig =A0 =A0 2008-12-19 18:13:58.000000000 +0900 > +++ pod/perlfaq9.pod =A0 =A02009-03-20 05:35:18.000000000 +0900 > @@ -433,7 +433,8 @@ > =A0 =A0 my $dot_atom =A0 =3D qr{$atom(?:\.$atom)*}; > =A0 =A0 my $quoted =A0 =A0 =3D qr{"(?:\\[^\r\n]|[^\\"])*"}; > =A0 =A0 my $local =A0 =A0 =A0=3D qr{(?:$dot_atom|$quoted)}; > - - =A0 =A0my $domain_lit =3D qr{\[(?:\\\S|[\x21-\x5a\x5e-\x7e])*\]}; > + =A0 =A0my $quotedpair =3D qr{\\[\x00-\x09\x0B-\x0c\x0e-\x7e]}; > + =A0 =A0my $domain_lit =3D qr{\[(?:$quotedpair|[\x21-\x5a\x5e-\x7e])*\]}= ; > =A0 =A0 my $domain =A0 =A0 =3D qr{(?:$dot_atom|$domain_lit)}; > =A0 =A0 my $addr_spec =A0=3D qr{$local\@$domain}; > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.8 (Darwin) > > iEYEARECAAYFAknCr8QACgkQErJia/WXtBuR/wCeKzdCFbsh9/itRqLFGMtn7Arq > kecAmwZsuEF5lNRpT/F3B6W/XwrpOlyg > =3DKRmZ > -----END PGP SIGNATURE----- > Thanks! This has been applied to blead. Steve Peters [email protected]