Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

unescaped braces in regex is deprecated in 5.17+ #7

Merged
merged 1 commit into from

2 participants

@garu

perl 5.17.0 and up deprecate the use of unescaped braces inside regular expressions, triggering a warning every time they see it (one that will, in time, become an error). This patch updates Text::Haml to newer perls :)

@garu garu unescaped braces in regex is deprecated in 5.17+
perl 5.17.0 and up deprecate the use of unescaped braces inside regular expressions, triggering a warning every time they see it (one that will, in time, become an error). This patch updates Text::Haml to newer perls :)
00a77ab
@vti vti merged commit 02cffd4 into vti:master
@vti
Owner

Thank you! We're ready for the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 30, 2012
  1. @garu

    unescaped braces in regex is deprecated in 5.17+

    garu authored
    perl 5.17.0 and up deprecate the use of unescaped braces inside regular expressions, triggering a warning every time they see it (one that will, in time, become an error). This patch updates Text::Haml to newer perls :)
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Text/Haml.pm
View
6 lib/Text/Haml.pm
@@ -889,11 +889,11 @@ sub _parse_text {
my $t;
my $escape = 0;
my $found = 0;
- if ($text =~ s/^(.*?)?(?<!\\)\#{//) {
+ if ($text =~ s/^(.*?)?(?<!\\)\#\{//) {
$found = 1;
$t = $1;
}
- elsif ($text =~ s/^(.*?)?\\\\\#{//) {
+ elsif ($text =~ s/^(.*?)?\\\\\#\{//) {
$found = 1;
$t = $1;
$escape = 1;
@@ -905,7 +905,7 @@ sub _parse_text {
}
if ($found) {
- $text =~ s/^([^}]+)}//;
+ $text =~ s/^([^}]+)\}//;
my $prefix = $escape ? quotemeta("\\") : '';
$output .= qq/$prefix".$1."/;
Something went wrong with that request. Please try again.