@@ -1,7 +1,20 @@
+0.037 2014-11-12 T. R. Wyant
+ Have PPIx::Regexp::Structure::RegexSet POD recognize that the Perl
+ docs (specifically perlrecharclass) now call this construction
+ Extended Bracketed Character Classes, not sets.
+
+0.036_01 2014-11-04 T. R. Wyant
+ Correctly mark the replacement portion of s///ee as code. Prior to
+ this release it was parsed as though no /e were present.
+ Make available the number of times a given modifier is asserted
+ (except for the match semantics modifiers which get handled
+ differently). See PPIx::Regexp::Token::Modifier->asserted() and
+ PPIx::Regexp::Tokenizer->modifier() for details.
+
0.036 2014-01-04 T. R. Wyant
Retract the "Allow non-ASCII white space under /x" change introduced
in version 0.033. I misread perl5170delta, and implemented early.
- Change tp explicit character class to recognize white space under /x.
+ Change to explicit character class to recognize white space under /x.
I was previously using \s, which matched too much.
Thanks to Nobuo Kumagai for finding and reporting this.
@@ -336,3 +349,5 @@
0.001 2009-10-21 T. R. Wyant
Initial release.
+
+# ex: set textwidth=72 autoindent :
@@ -4,7 +4,7 @@
"Tom Wyant (wyant at cpan dot org)"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4203",
+ "generated_by" : "Module::Build version 0.421",
"license" : [
"perl_5"
],
@@ -40,239 +40,239 @@
"provides" : {
"PPIx::Regexp" : {
"file" : "lib/PPIx/Regexp.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Constant" : {
"file" : "lib/PPIx/Regexp/Constant.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Dumper" : {
"file" : "lib/PPIx/Regexp/Dumper.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Element" : {
"file" : "lib/PPIx/Regexp/Element.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Lexer" : {
"file" : "lib/PPIx/Regexp/Lexer.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Node" : {
"file" : "lib/PPIx/Regexp/Node.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Node::Range" : {
"file" : "lib/PPIx/Regexp/Node/Range.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure" : {
"file" : "lib/PPIx/Regexp/Structure.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Assertion" : {
"file" : "lib/PPIx/Regexp/Structure/Assertion.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::BranchReset" : {
"file" : "lib/PPIx/Regexp/Structure/BranchReset.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Capture" : {
"file" : "lib/PPIx/Regexp/Structure/Capture.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::CharClass" : {
"file" : "lib/PPIx/Regexp/Structure/CharClass.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Code" : {
"file" : "lib/PPIx/Regexp/Structure/Code.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Main" : {
"file" : "lib/PPIx/Regexp/Structure/Main.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Modifier" : {
"file" : "lib/PPIx/Regexp/Structure/Modifier.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::NamedCapture" : {
"file" : "lib/PPIx/Regexp/Structure/NamedCapture.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Quantifier" : {
"file" : "lib/PPIx/Regexp/Structure/Quantifier.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::RegexSet" : {
"file" : "lib/PPIx/Regexp/Structure/RegexSet.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Regexp" : {
"file" : "lib/PPIx/Regexp/Structure/Regexp.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Replacement" : {
"file" : "lib/PPIx/Regexp/Structure/Replacement.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Subexpression" : {
"file" : "lib/PPIx/Regexp/Structure/Subexpression.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Switch" : {
"file" : "lib/PPIx/Regexp/Structure/Switch.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Structure::Unknown" : {
"file" : "lib/PPIx/Regexp/Structure/Unknown.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Support" : {
"file" : "lib/PPIx/Regexp/Support.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token" : {
"file" : "lib/PPIx/Regexp/Token.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Assertion" : {
"file" : "lib/PPIx/Regexp/Token/Assertion.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Backreference" : {
"file" : "lib/PPIx/Regexp/Token/Backreference.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Backtrack" : {
"file" : "lib/PPIx/Regexp/Token/Backtrack.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::CharClass" : {
"file" : "lib/PPIx/Regexp/Token/CharClass.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::CharClass::POSIX" : {
"file" : "lib/PPIx/Regexp/Token/CharClass/POSIX.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::CharClass::POSIX::Unknown" : {
"file" : "lib/PPIx/Regexp/Token/CharClass/POSIX/Unknown.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::CharClass::Simple" : {
"file" : "lib/PPIx/Regexp/Token/CharClass/Simple.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Code" : {
"file" : "lib/PPIx/Regexp/Token/Code.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Comment" : {
"file" : "lib/PPIx/Regexp/Token/Comment.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Condition" : {
"file" : "lib/PPIx/Regexp/Token/Condition.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Control" : {
"file" : "lib/PPIx/Regexp/Token/Control.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Delimiter" : {
"file" : "lib/PPIx/Regexp/Token/Delimiter.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Greediness" : {
"file" : "lib/PPIx/Regexp/Token/Greediness.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType" : {
"file" : "lib/PPIx/Regexp/Token/GroupType.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::Assertion" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/Assertion.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::BranchReset" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/BranchReset.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::Code" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/Code.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::Modifier" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/Modifier.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::NamedCapture" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/NamedCapture.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::Subexpression" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/Subexpression.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::GroupType::Switch" : {
"file" : "lib/PPIx/Regexp/Token/GroupType/Switch.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Interpolation" : {
"file" : "lib/PPIx/Regexp/Token/Interpolation.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Literal" : {
"file" : "lib/PPIx/Regexp/Token/Literal.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Modifier" : {
"file" : "lib/PPIx/Regexp/Token/Modifier.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Operator" : {
"file" : "lib/PPIx/Regexp/Token/Operator.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Quantifier" : {
"file" : "lib/PPIx/Regexp/Token/Quantifier.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Recursion" : {
"file" : "lib/PPIx/Regexp/Token/Recursion.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Reference" : {
"file" : "lib/PPIx/Regexp/Token/Reference.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Structure" : {
"file" : "lib/PPIx/Regexp/Token/Structure.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Unknown" : {
"file" : "lib/PPIx/Regexp/Token/Unknown.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Unmatched" : {
"file" : "lib/PPIx/Regexp/Token/Unmatched.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Token::Whitespace" : {
"file" : "lib/PPIx/Regexp/Token/Whitespace.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Tokenizer" : {
"file" : "lib/PPIx/Regexp/Tokenizer.pm",
- "version" : "0.036"
+ "version" : "0.037"
},
"PPIx::Regexp::Util" : {
"file" : "lib/PPIx/Regexp/Util.pm",
- "version" : "0.036"
+ "version" : "0.037"
}
},
"release_status" : "stable",
@@ -284,5 +284,5 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.036"
+ "version" : "0.037"
}
@@ -3,13 +3,13 @@ abstract: 'Parse regular expressions'
author:
- 'Tom Wyant (wyant at cpan dot org)'
build_requires:
- Test::More: 0.88
+ Test::More: '0.88'
dynamic_config: 1
-generated_by: 'Module::Build version 0.4203, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.142690'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: PPIx-Regexp
no_index:
directory:
@@ -19,189 +19,189 @@ no_index:
provides:
PPIx::Regexp:
file: lib/PPIx/Regexp.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Constant:
file: lib/PPIx/Regexp/Constant.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Dumper:
file: lib/PPIx/Regexp/Dumper.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Element:
file: lib/PPIx/Regexp/Element.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Lexer:
file: lib/PPIx/Regexp/Lexer.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Node:
file: lib/PPIx/Regexp/Node.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Node::Range:
file: lib/PPIx/Regexp/Node/Range.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure:
file: lib/PPIx/Regexp/Structure.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Assertion:
file: lib/PPIx/Regexp/Structure/Assertion.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::BranchReset:
file: lib/PPIx/Regexp/Structure/BranchReset.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Capture:
file: lib/PPIx/Regexp/Structure/Capture.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::CharClass:
file: lib/PPIx/Regexp/Structure/CharClass.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Code:
file: lib/PPIx/Regexp/Structure/Code.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Main:
file: lib/PPIx/Regexp/Structure/Main.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Modifier:
file: lib/PPIx/Regexp/Structure/Modifier.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::NamedCapture:
file: lib/PPIx/Regexp/Structure/NamedCapture.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Quantifier:
file: lib/PPIx/Regexp/Structure/Quantifier.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::RegexSet:
file: lib/PPIx/Regexp/Structure/RegexSet.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Regexp:
file: lib/PPIx/Regexp/Structure/Regexp.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Replacement:
file: lib/PPIx/Regexp/Structure/Replacement.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Subexpression:
file: lib/PPIx/Regexp/Structure/Subexpression.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Switch:
file: lib/PPIx/Regexp/Structure/Switch.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Structure::Unknown:
file: lib/PPIx/Regexp/Structure/Unknown.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Support:
file: lib/PPIx/Regexp/Support.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token:
file: lib/PPIx/Regexp/Token.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Assertion:
file: lib/PPIx/Regexp/Token/Assertion.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Backreference:
file: lib/PPIx/Regexp/Token/Backreference.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Backtrack:
file: lib/PPIx/Regexp/Token/Backtrack.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::CharClass:
file: lib/PPIx/Regexp/Token/CharClass.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::CharClass::POSIX:
file: lib/PPIx/Regexp/Token/CharClass/POSIX.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::CharClass::POSIX::Unknown:
file: lib/PPIx/Regexp/Token/CharClass/POSIX/Unknown.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::CharClass::Simple:
file: lib/PPIx/Regexp/Token/CharClass/Simple.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Code:
file: lib/PPIx/Regexp/Token/Code.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Comment:
file: lib/PPIx/Regexp/Token/Comment.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Condition:
file: lib/PPIx/Regexp/Token/Condition.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Control:
file: lib/PPIx/Regexp/Token/Control.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Delimiter:
file: lib/PPIx/Regexp/Token/Delimiter.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Greediness:
file: lib/PPIx/Regexp/Token/Greediness.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType:
file: lib/PPIx/Regexp/Token/GroupType.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::Assertion:
file: lib/PPIx/Regexp/Token/GroupType/Assertion.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::BranchReset:
file: lib/PPIx/Regexp/Token/GroupType/BranchReset.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::Code:
file: lib/PPIx/Regexp/Token/GroupType/Code.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::Modifier:
file: lib/PPIx/Regexp/Token/GroupType/Modifier.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::NamedCapture:
file: lib/PPIx/Regexp/Token/GroupType/NamedCapture.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::Subexpression:
file: lib/PPIx/Regexp/Token/GroupType/Subexpression.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::GroupType::Switch:
file: lib/PPIx/Regexp/Token/GroupType/Switch.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Interpolation:
file: lib/PPIx/Regexp/Token/Interpolation.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Literal:
file: lib/PPIx/Regexp/Token/Literal.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Modifier:
file: lib/PPIx/Regexp/Token/Modifier.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Operator:
file: lib/PPIx/Regexp/Token/Operator.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Quantifier:
file: lib/PPIx/Regexp/Token/Quantifier.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Recursion:
file: lib/PPIx/Regexp/Token/Recursion.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Reference:
file: lib/PPIx/Regexp/Token/Reference.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Structure:
file: lib/PPIx/Regexp/Token/Structure.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Unknown:
file: lib/PPIx/Regexp/Token/Unknown.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Unmatched:
file: lib/PPIx/Regexp/Token/Unmatched.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Token::Whitespace:
file: lib/PPIx/Regexp/Token/Whitespace.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Tokenizer:
file: lib/PPIx/Regexp/Tokenizer.pm
- version: 0.036
+ version: '0.037'
PPIx::Regexp::Util:
file: lib/PPIx/Regexp/Util.pm
- version: 0.036
+ version: '0.037'
requires:
- List::MoreUtils: 0
- List::Util: 0
- PPI::Document: 1.117
- Scalar::Util: 0
- Task::Weaken: 0
- perl: 5.006
+ List::MoreUtils: '0'
+ List::Util: '0'
+ PPI::Document: '1.117'
+ Scalar::Util: '0'
+ Task::Weaken: '0'
+ perl: '5.006'
resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-Regexp
license: http://dev.perl.org/licenses/
-version: 0.036
+version: '0.037'
@@ -11,7 +11,7 @@ use PPI::Document;
use PPIx::Regexp::Dumper;
use Scalar::Util qw{ refaddr };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
my %opt = (
default_modifiers => [],
@@ -5,7 +5,7 @@ use warnings;
use base qw{ Module::Build };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
use Carp;
@@ -13,7 +13,7 @@ use PPIx::Regexp::Util qw{ __instance };
use Scalar::Util qw{ looks_like_number refaddr };
use Test::More 0.88;
-our $VERSION = '0.036';
+our $VERSION = '0.037';
our @EXPORT_OK = qw{
cache_count
@@ -22,6 +22,7 @@ our @EXPORT_OK = qw{
cmp_ok
content
count
+ diag
different
done_testing
dump_result
@@ -29,6 +30,7 @@ our @EXPORT_OK = qw{
finis
equals
navigate
+ note
parse
plan
ppi
@@ -3,7 +3,7 @@ package PPIx::Regexp::Constant;
use strict;
use warnings;
-our $VERSION = '0.036';
+our $VERSION = '0.037';
use base qw{ Exporter };
@@ -44,7 +44,7 @@ use PPIx::Regexp;
use PPIx::Regexp::Tokenizer;
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 new
@@ -42,7 +42,7 @@ use Scalar::Util qw{ refaddr weaken };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL TOKEN_UNKNOWN };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 ancestor_of
@@ -61,7 +61,7 @@ use PPIx::Regexp::Token::Unmatched ();
use PPIx::Regexp::Tokenizer ();
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 new
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Node };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
1;
@@ -41,7 +41,7 @@ use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
use PPIx::Regexp::Util qw{ __instance };
use Scalar::Util qw{ refaddr };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub _new {
my ( $class, @children ) = @_;
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
1;
@@ -36,7 +36,7 @@ use base qw{ PPIx::Regexp::Structure };
use Carp qw{ confess };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Called by the lexer to record the capture number.
sub __PPIX_LEXER__record_capture_number {
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 name
@@ -36,7 +36,7 @@ use base qw{ PPIx::Regexp::Structure };
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub _new {
my ( $class, @args ) = @_;
@@ -39,7 +39,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# The only child of this structure should be a single
# PPIx::Regexp::Token::Code. Anything else gets turned into the
@@ -40,7 +40,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 delimiters
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# This is a kluge for both determining whether the object asserts
# modifiers (hence the 'ductype') and determining whether the given
@@ -41,7 +41,7 @@ use Carp;
use base qw{ PPIx::Regexp::Structure::Capture };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 name
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub can_be_quantified {
return;
@@ -5,7 +5,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
1;
@@ -54,6 +54,10 @@ parse. If this functionality is retracted and the syntax used for
something else, C<PPIx::Regexp> will forget completely about regex
character sets.
+At some point, the documentation started calling these "Extended
+Bracketed Character Classes", and documenting them in
+L<perlrecharclass|perlrecharclass>.
+
=head1 METHODS
This class supports no public methods over and above those supported by
@@ -36,7 +36,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure::Main };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub can_be_quantified { return; }
@@ -38,7 +38,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure::Main };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub can_be_quantified { return; }
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
1;
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub __PPIX_LEXER__finalize {
my ( $self ) = @_;
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
1;
@@ -52,7 +52,7 @@ use PPIx::Regexp::Constant qw{ STRUCTURE_UNKNOWN };
use PPIx::Regexp::Util qw{ __instance };
use Scalar::Util qw{ refaddr };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub _new {
my ( $class, @args ) = @_;
@@ -37,7 +37,7 @@ use warnings;
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 close_bracket
@@ -38,7 +38,7 @@ use base qw{ PPIx::Regexp::Token };
use PPIx::Regexp::Constant qw{ COOKIE_CLASS MINIMUM_PERL TOKEN_LITERAL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -40,7 +40,7 @@ use PPIx::Regexp::Constant qw{
TOKEN_LITERAL TOKEN_UNKNOWN
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -33,7 +33,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -9,7 +9,7 @@ use base qw{ PPIx::Regexp::Token::CharClass::POSIX };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub perl_version_introduced {
# my ( $self ) = @_;
@@ -43,7 +43,7 @@ use base qw{ PPIx::Regexp::Token::CharClass };
use PPIx::Regexp::Constant qw{ COOKIE_CLASS COOKIE_REGEX_SET MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -39,7 +39,7 @@ use PPIx::Regexp::Constant qw{
COOKIE_CLASS MINIMUM_PERL TOKEN_LITERAL TOKEN_UNKNOWN
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
##=head2 is_case_sensitive
##
@@ -39,7 +39,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -50,7 +50,7 @@ use PPI::Document;
use PPIx::Regexp::Constant qw{ COOKIE_REGEX_SET };
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub _new {
my ( $class, $content ) = @_;
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -37,7 +37,7 @@ use base qw{ PPIx::Regexp::Token::Reference };
use PPIx::Regexp::Constant qw{ RE_CAPTURE_NAME };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub perl_version_introduced {
my ( $self ) = @_;
@@ -45,7 +45,7 @@ use PPIx::Regexp::Constant qw{
COOKIE_QUOTE MINIMUM_PERL TOKEN_LITERAL TOKEN_UNKNOWN
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token::Structure };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -37,7 +37,7 @@ use base qw{ PPIx::Regexp::Token };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -36,7 +36,7 @@ use base qw{ PPIx::Regexp::Token::GroupType };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
{
my %perl_version_introduced = (
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token::GroupType };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -43,7 +43,7 @@ use base qw{ PPIx::Regexp::Token::GroupType };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -38,7 +38,7 @@ use base qw{ PPIx::Regexp::Token::Modifier PPIx::Regexp::Token::GroupType };
use PPIx::Regexp::Constant qw{ MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
{
@@ -43,7 +43,7 @@ use Carp qw{ confess };
use PPIx::Regexp::Constant qw{ RE_CAPTURE_NAME };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
use constant NAMED_CAPTURE =>
qr{ \A \\? \? (?: P? < ( @{[ RE_CAPTURE_NAME ]} ) \\? > |
@@ -34,7 +34,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token::GroupType };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token::GroupType };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub perl_version_introduced {
# my ( $self ) = @_;
@@ -43,7 +43,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -39,7 +39,7 @@ use PPIx::Regexp::Constant qw{
COOKIE_CLASS COOKIE_REGEX_SET TOKEN_LITERAL MINIMUM_PERL
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# This can be quantified because it might interpolate a quantifiable
@@ -38,7 +38,7 @@ use PPIx::Regexp::Constant qw{
COOKIE_CLASS COOKIE_REGEX_SET MINIMUM_PERL TOKEN_UNKNOWN
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -83,12 +83,13 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
+use Carp;
use PPIx::Regexp::Constant qw{
MINIMUM_PERL
MODIFIER_GROUP_MATCH_SEMANTICS
};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Define modifiers that are to be aggregated internally for ease of
# computation.
@@ -113,6 +114,13 @@ This method returns true if the token explicitly asserts the given
modifier. The example would return true for the modifier in
C<(?i:foo)>, but false for C<(?-i:foo)>.
+Starting with version 0.036_01, if the argument is a
+single-character modifier followed by an asterisk (intended as a wild
+card character), the return is the number of times that modifier
+appears. In this case an exception will be thrown if you specify a
+multi-character modifier (e.g. C<'ee*'>), or if you specify one of the
+match semantics modifiers (e.g. C<'a*'>).
+
If called without an argument, or with an undef argument, all modifiers
explicitly asserted by this token are returned.
@@ -138,9 +146,19 @@ sub asserts {
sub __asserts {
my ( $present, $modifier ) = @_;
- my $bin = $aggregate{$modifier}
- or return $present->{$modifier};
- return defined $present->{$bin} && $modifier eq $present->{$bin};
+ if ( my $bin = $aggregate{$modifier} ) {
+ return defined $present->{$bin} && $modifier eq $present->{$bin};
+ }
+ if ( $modifier =~ s/ [*] \z //smx ) {
+ $aggregate{$modifier}
+ and croak "Can not use wild card on modifier '$modifier*'";
+ 1 == length $modifier
+ or croak "Can not use wild card on multi-character modifier '$modifier*'";
+ return $present->{$modifier} || 0;
+ }
+ my $len = length $modifier;
+ $modifier = substr $modifier, 0, 1;
+ return $present->{$modifier} && $len == $present->{$modifier};
}
sub can_be_quantified { return };
@@ -301,7 +319,11 @@ sub __aggregate_modifiers {
# also comes through here, so we have to handle it.
$present{$bin} = $value ? $1 : undef;
} else {
- $present{$1} = $value;
+ # TODO have to think about this, since I need asserts(
+ # 'e' ) to be 2 if we in fact have 'ee'. Is this
+ # correct?
+# $present{$1} = $value;
+ $present{$2} = $value * length $1;
}
}
}
@@ -38,7 +38,7 @@ use base qw{ PPIx::Regexp::Token };
use PPIx::Regexp::Constant qw{ TOKEN_LITERAL };
use PPIx::Regexp::Util qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -35,7 +35,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -36,7 +36,7 @@ use base qw{ PPIx::Regexp::Token::Reference };
use Carp qw{ confess };
use PPIx::Regexp::Constant qw{ RE_CAPTURE_NAME };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -42,7 +42,7 @@ use base qw{ PPIx::Regexp::Token };
use Carp qw{ confess };
use List::Util qw{ first };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 absolute
@@ -53,7 +53,7 @@ use PPIx::Regexp::Token::Backreference ();
use PPIx::Regexp::Token::Backtrack ();
use PPIx::Regexp::Token::Recursion ();
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
@@ -37,7 +37,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
sub can_be_quantified { return };
@@ -39,7 +39,7 @@ use warnings;
use base qw{ PPIx::Regexp::Token };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
# Return true if the token can be quantified, and false otherwise
# sub can_be_quantified { return };
@@ -39,7 +39,7 @@ use base qw{ PPIx::Regexp::Token };
use PPIx::Regexp::Constant qw{ COOKIE_REGEX_SET MINIMUM_PERL };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub perl_version_introduced {
my ( $self ) = @_;
@@ -50,7 +50,7 @@ use warnings;
use base qw{PPIx::Regexp::Element};
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub _new {
my ( $class, $content ) = @_;
@@ -42,7 +42,7 @@ use PPIx::Regexp::Token::Whitespace ();
use PPIx::Regexp::Util qw{ __instance };
use Scalar::Util qw{ looks_like_number };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
{
# Names of classes containing tokenization machinery. There are few
@@ -420,7 +420,8 @@ sub match {
sub modifier {
my ( $self, $modifier ) = @_;
- return $self->{modifiers}[-1]{$modifier};
+ return PPIx::Regexp::Token::Modifier::__asserts(
+ $self->{modifiers}[-1], $modifier );
}
sub modifier_duplicate {
@@ -722,9 +723,9 @@ sub __PPIX_TOKENIZER__finish {
$tokenizer->{delimiter_re} = undef;
}
- if ( $tokenizer->modifier( 'e' ) ) {
- # With /e, the replacement portion is code. We make it all
- # into one big PPIx::Regexp::Token::Code, slap on the
+ if ( $tokenizer->modifier( 'e*' ) ) {
+ # With /e or /ee, the replacement portion is code. We make
+ # it all into one big PPIx::Regexp::Token::Code, slap on the
# trailing delimiter and modifiers, and return it all.
push @tokens, $tokenizer->make_token(
$tokenizer->{cursor_limit} - $tokenizer->{cursor_curr},
@@ -870,6 +871,13 @@ L<PPIx::Regexp::Token::Unknown|PPIx::Regexp::Token::Unknown>.
This method returns true if the given modifier character was found on
the end of the regular expression, and false otherwise.
+Starting with version 0.036_01, if the argument is a
+single-character modifier followed by an asterisk (intended as a wild
+card character), the return is the number of times that modifier
+appears. In this case an exception will be thrown if you specify a
+multi-character modifier (e.g. C<'ee*'>), or if you specify one of the
+match semantics modifiers (e.g. C<'a*'>).
+
=head2 next_token
my $token = $tokenizer->next_token();
@@ -12,7 +12,7 @@ use base qw{ Exporter };
our @EXPORT_OK = qw{ __instance };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
sub __instance {
my ( $object, $class ) = @_;
@@ -92,7 +92,7 @@ use PPIx::Regexp::Token::Modifier (); # For its modifier manipulations.
use PPIx::Regexp::Util qw{ __instance };
use Scalar::Util qw{ refaddr };
-our $VERSION = '0.036';
+our $VERSION = '0.037';
=head2 new
@@ -428,6 +428,13 @@ This method returns true if the given modifier is asserted for the
regexp, whether explicitly or by the modifiers passed in the
C<default_modifiers> argument.
+Starting with version 0.036_01, if the argument is a
+single-character modifier followed by an asterisk (intended as a wild
+card character), the return is the number of times that modifier
+appears. In this case an exception will be thrown if you specify a
+multi-character modifier (e.g. C<'ee*'>), or if you specify one of the
+match semantics modifiers (e.g. C<'a*'>).
+
=cut
sub modifier_asserted {
@@ -4548,7 +4548,7 @@ choose ( 3 );
class ( 'PPIx::Regexp::Token::Delimiter' );
content ( '/' );
choose ( 4 );
-class ( 'PPIx::Regexp::Token::Interpolation' );
+class ( 'PPIx::Regexp::Token::Code' );
content ( '$1' );
choose ( 5 );
class ( 'PPIx::Regexp::Token::Delimiter' );
@@ -4583,7 +4583,7 @@ choose ( child => 2, finish => 0 );
class ( 'PPIx::Regexp::Token::Delimiter' );
content ( '/' );
choose ( child => 2, child => 0 );
-class ( 'PPIx::Regexp::Token::Interpolation' );
+class ( 'PPIx::Regexp::Token::Code' );
content ( '$1' );
choose ( child => 3 );
class ( 'PPIx::Regexp::Token::Modifier' );
@@ -1456,6 +1456,37 @@ choose ( 2 );
class ( 'PPIx::Regexp::Token::Literal' );
content ( "\240" );
+note '/ee should parse like /e';
+tokenize( 's/foo/bar(42)/ee' );
+count ( 9 );
+choose ( 0 );
+class ( 'PPIx::Regexp::Token::Structure' );
+content ( 's' );
+choose ( 1 );
+class ( 'PPIx::Regexp::Token::Delimiter' );
+content ( '/' );
+choose ( 2 );
+class ( 'PPIx::Regexp::Token::Literal' );
+content ( 'f' );
+choose ( 3 );
+class ( 'PPIx::Regexp::Token::Literal' );
+content ( 'o' );
+choose ( 4 );
+class ( 'PPIx::Regexp::Token::Literal' );
+content ( 'o' );
+choose ( 5 );
+class ( 'PPIx::Regexp::Token::Delimiter' );
+content ( '/' );
+choose ( 6 );
+class ( 'PPIx::Regexp::Token::Code' );
+content ( 'bar(42)' );
+choose ( 7 );
+class ( 'PPIx::Regexp::Token::Delimiter' );
+content ( '/' );
+choose ( 8 );
+class ( 'PPIx::Regexp::Token::Modifier' );
+content ( 'ee' );
+
SKIP: {
$is_ascii
or skip(
@@ -29,6 +29,7 @@ lexes
merchantability
nav
navigational
+perlrecharclass
perluniprops
POSIX
PPI