Perl Unescaped left brace in regex issue - nagios check_multi - TagMerge
24Perl Unescaped left brace in regex issue - nagios check_multiPerl Unescaped left brace in regex issue - nagios check_multi

Perl Unescaped left brace in regex issue - nagios check_multi

Asked 5 months ago
1
24 answers

Change line to :

push @result, "$key=$ENV{$key}" if ($key=~/\Q$pattern/);

Source: link

0

OK, so the following prints the deprecation message.
perl -lE 'm/x{x}/'
Why doesn't the following?
perl -lE 'm/x({x})/'
e.g. in the capture group is the { allowed unescaped? Probably not because
perl -lE 'm/x(x{x})/'
See regcomp.c in the Perl source (the below is from 5.22.0):
case '{':
            /* Currently we don't warn when the lbrace is at the start
             * of a construct.  This catches it in the middle of a
             * literal string, or when its the first thing after
             * something like "\b" */
            if (! SIZE_ONLY
                && (len || (p > RExC_start && isALPHA_A(*(p -1)))))
            {
                ckWARNregdep(p + 1, "Unescaped left brace in regex is deprecated, passed through");
            }
            /*FALLTHROUGH*/
        default:    /* A literal character */
          normal_default:
            if (UTF8_IS_START(*p) && UTF) {
                STRLEN numlen;
                ender = utf8n_to_uvchr((U8*)p, RExC_end - p,
                                       &numlen, UTF8_ALLOW_DEFAULT);
                p += numlen;
            }
            else
                ender = (U8) *p++;
            break;
        } /* End of switch on the literal */
Demo:
$ perl -e '/{/'    # Beginning of pattern, no warning

$ perl -e '/.{/'   # Doesn't follow alpha, no warning

$ perl -e '/x{3}/' # Valid quantifier, no warning

$ perl -e '/\x{/'  # Part of special escape sequence \x{}, different warning
Missing right brace on \x{} in regex; marked by <-- HERE in m/\x{ <-- HERE / at -e line 1.

$ perl -e '/x{/'   # Follows alpha, isn't a quantifier or special escape, warns
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/x{ <-- HERE / at -e line 1.

Source: link

0

These messages are classified as follows (listed in increasing order of desperation):
(W) A warning (optional).
(D) A deprecation (enabled by default).
(S) A severe warning (enabled by default).
(F) A fatal error (trappable).
(P) An internal error you should never see (trappable).
(X) A very fatal error (nontrappable).
(A) An alien error message (not generated by Perl).
(S experimental::refaliasing) This warning is emitted if you use a reference constructor on the left-hand side of an assignment to alias one variable to another. Simply suppress the warning if you want to use the feature, but know that in doing so you are taking the risk of using an experimental feature which may change or be removed in a future Perl version:
no warnings "experimental::refaliasing";
use feature "refaliasing";
\$x = \$y;
(F) An error peculiar to VMS. Perl does its own command line redirection, and thinks you tried to redirect stdout both to a file and into a pipe to another command. You need to choose one or the other, though nothing's stopping you from piping into a program or Perl script which 'splits' output into two streams, such as
open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
while (<STDIN>) {
    print;
    print OUT;
}
close OUT;
(F) Each subroutine signature parameter declaration must start with a valid sigil; for example:
sub foo ($a, $, $b = 1, @c) {}
(F) Only scalar subroutine signature parameters may have a default value; for example:
sub foo ($a = 1)        {} # legal
sub foo (@a = (1))      {} # invalid
sub foo (%a = (a => b)) {} # invalid

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

0

After compiling and installing GNU automake 1.15, I get this error whenever I run automake:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/
at /usr/local/bin/automake line 3936
From the ChangeLog:
966 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
  967 
  968   automake: port to Perl 5.22 and later
  969 
  970   Without this change, Perl 5.22 complains "Unescaped left brace in
  971   regex is deprecated" and this is planned to become a hard error in
  972   Perl 5.26.  See:
  973   http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
  974   * bin/automake.in (substitute_ac_subst_variables): Escape left brace.

Source: link

Recent Questions on regex

    Programming Languages