[ABE.pm] possible bug in Regexp::Assemble
Ted Fiedler
fiedlert at gmail.com
Wed Jan 16 11:57:49 PST 2008
Can anyone explain this behavior?
code
#!/home/tfiedler/perl/bin/perl
use strict;
use warnings;
use Regexp::Assemble;
use Data::Dumper;
my $ra = Regexp::Assemble->new;
$ra->add( 'ab+c' );
$ra->add( 'ab+-' );
$ra->add( 'a\w\d+' );
$ra->add( 'a\d+' );
print $ra->re; # prints a(?:\w?\d+|b+[-c])
#print Dumper $ra;
Thats the code from the documentation w/ the exception of the
Data::Dumper stuff...
So I run this and get no output, If I comment out the last line print
Dumper...
I get:
[tfiedler at rlinux2]~/bin% ./regexp.pl
(?-xism:a(?:\w?\d+|b+[-c]))$VAR1 = bless( {
'anchor_string_begin' => 0,
'unroll_plus' => 0,
'anchor_line_begin' => 0,
'anchor_line_end' => 0,
'anchor_string_end' => 0,
'anchor_word_begin' => 0,
'debug' => 0,
'lookahead' => 0,
'anchor_word_end' => 0,
'reduce' => 1,
'mutable' => 0,
'flags' => '',
'str' => 'a(?:\\w?\\d+|b+[-c])',
'fold_meta_pairs' => 1,
'track' => 0,
're' => qr/(?-xism:a(?:\w?\d+|b+[-c]))/,
'path' => [],
'indent' => 0,
'stats_raw' => 18,
'stats_cooked' => 18,
'stats_add' => 4,
'chomp' => 1,
'anchor_string_end_absolute' => 0,
'dup_warn' => 0
}, 'Regexp::Assemble' );
Which is what I expect. Any ideas?
Ted
More information about the ABE-pm
mailing list