You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Laszlo Bodor (JIRA)" <ji...@apache.org> on 2018/12/10 19:44:00 UTC

[jira] [Updated] (PIG-5368) Braces without escaping in regexes throws error in recent perl versions

     [ https://issues.apache.org/jira/browse/PIG-5368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Laszlo Bodor updated PIG-5368:
------------------------------
    Attachment: 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)