pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-5368) Braces without escaping in regexes throws error in recent perl versions
Date Mon, 10 Dec 2018 21:24:00 GMT

    [ https://issues.apache.org/jira/browse/PIG-5368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715575#comment-16715575
] 

Daniel Dai commented on PIG-5368:
---------------------------------

Also committed PIG-5368-1.addendum.patch.

> Braces without escaping in regexes throws error in recent perl versions
> -----------------------------------------------------------------------
>
>                 Key: PIG-5368
>                 URL: https://issues.apache.org/jira/browse/PIG-5368
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Laszlo Bodor
>            Assignee: Laszlo Bodor
>            Priority: Major
>             Fix For: 0.18.0
>
>         Attachments: PIG-5368-1.addendum.patch, PIG-5368-1.patch
>
>
>  
> |In perl v5.22, using a literal { in a regular expression was deprecated, and will emit
a warning if it isn't escaped: \{. In v5.26, this won't just warn, it'll cause a syntax error.|
> Example: [https://github.com/apache/pig/blob/e766b6bf29e610b6312f8447fc008bed6beb4090/test/e2e/pig/tests/cmdline.conf#L47]
 
> {code}
> $ perl -e 'print "It matches\n" if "Hello World" =~ /World{abc}/'
> Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/World\{
<-- HERE abc}/ at -e line 1.
> $ perl -e 'print "It matches\n" if "Hello World" =~ /World\{abc}/'
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message