diff options
-rw-r--r-- | lib/Text/Balanced.pm | 4 | ||||
-rw-r--r-- | t/lib/tb-xvari.t | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Text/Balanced.pm b/lib/Text/Balanced.pm index 18f95593c0..73d633241a 100644 --- a/lib/Text/Balanced.pm +++ b/lib/Text/Balanced.pm @@ -10,7 +10,7 @@ use Exporter; use SelfLoader; use vars qw { $VERSION @ISA %EXPORT_TAGS }; -$VERSION = '1.84'; +$VERSION = '1.85'; @ISA = qw ( Exporter ); %EXPORT_TAGS = ( ALL => [ qw( @@ -455,7 +455,7 @@ sub _match_variable($$) while (1) { next if _match_codeblock($textref, - qr/\s*->\s*(?:[a-zA-Z]\w+\s*)?/, + qr/\s*->\s*(?:[_a-zA-Z]\w+\s*)?/, qr/[({[]/, qr/[)}\]]/, qr/[({[]/, qr/[)}\]]/, 0); next if _match_codeblock($textref, diff --git a/t/lib/tb-xvari.t b/t/lib/tb-xvari.t index 0fa2360b35..dd35b9c032 100644 --- a/t/lib/tb-xvari.t +++ b/t/lib/tb-xvari.t @@ -11,7 +11,7 @@ BEGIN { # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) -BEGIN { $| = 1; print "1..77\n"; } +BEGIN { $| = 1; print "1..81\n"; } END {print "not ok 1\n" unless $loaded;} use Text::Balanced qw ( extract_variable ); $loaded = 1; @@ -82,6 +82,8 @@ $a->{"cat"}[1]; @$listref; @{$listref}; $obj->nextval; +$obj->_nextval; +$obj->next_val_; @{$obj->nextval}; @{$obj->nextval($cat,$dog)->{new}}; @{$obj->nextval($cat?$dog:$fish)->{new}}; |