Skip to content

Commit

Permalink
default to one-level of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Sep 17, 2015
1 parent 8e7560c commit 3056b7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
Release history for Email-Address

{{$NEXT}}
- default to 1 level of nested comments to avoid pathological behaviors

1.907 2015-02-03 17:48:10-05:00 America/New_York
- restore 5.8.x compatibility
Expand Down
10 changes: 3 additions & 7 deletions lib/Email/Address.pm
Expand Up @@ -3,7 +3,7 @@ use warnings;
package Email::Address;
# ABSTRACT: RFC 2822 Address Parsing and Creation

our $COMMENT_NEST_LEVEL ||= 2;
our $COMMENT_NEST_LEVEL ||= 1;
our $STRINGIFY ||= 'format';
our $COLLAPSE_SPACES = 1 unless defined $COLLAPSE_SPACES; # I miss //=

Expand All @@ -16,10 +16,6 @@ our $COLLAPSE_SPACES = 1 unless defined $COLLAPSE_SPACES; # I miss //=
print $address->format;
=head1 VERSION
version 1.898
=head1 DESCRIPTION
This class implements a regex-based RFC 2822 parser that locates email
Expand Down Expand Up @@ -163,8 +159,8 @@ multiple addresses. The behavior in scalar context is undefined.
The specification for an email address allows for infinitely nestable comments.
That's nice in theory, but a little over done. By default this module allows
for two (C<2>) levels of nested comments. If you think you need more, modify
the C<$Email::Address::COMMENT_NEST_LEVEL> package variable to allow more.
for one (C<1>) level of nested comments. If you think you need more, modify the
C<$Email::Address::COMMENT_NEST_LEVEL> package variable to allow more.
$Email::Address::COMMENT_NEST_LEVEL = 10; # I'm deep
Expand Down

0 comments on commit 3056b7d

Please sign in to comment.