[Rt-commit] rt branch, 4.0/perl-5.18-compat, created. rt-4.0.12-32-g1c28858

Alex Vandiver alexmv at bestpractical.com
Mon May 20 15:55:22 EDT 2013


The branch, 4.0/perl-5.18-compat has been created
        at  1c288588e668fc3c21fd41b7eed8568fdb9c61c4 (commit)

- Log -----------------------------------------------------------------
commit 0ae1b98dc5e90af5268666f22d1253b97d04c881
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Dec 5 23:32:09 2012 -0800

    Escape { and } in regexes when used as literals
    
    Perl 5.17.6 (on the path to 5.18) deprecates and warns quite noisily
    about unescaped braces.  RT's dependency chain isn't fully clean of this
    warning, however...

diff --git a/bin/rt.in b/bin/rt.in
index 64975ad..802d35b 100644
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1527,15 +1527,15 @@ sub vsplit {
                 }
                 push @words, $s;
             }
-            elsif ( $a =~ /^q{/ ) {
+            elsif ( $a =~ /^q\{/ ) {
                 my $s = $a;
-                while ( $a !~ /}$/ ) {
+                while ( $a !~ /\}$/ ) {
                     ( $a, $b ) =
                       split /\s*,\s*/, $b, 2;
                     $s .= ',' . $a;
                 }
-                $s =~ s/^q{/'/;
-                $s =~ s/}/'/;
+                $s =~ s/^q\{/'/;
+                $s =~ s/\}/'/;
                 push @words, $s;
             }
             else {
diff --git a/devel/tools/license_tag b/devel/tools/license_tag
index 05bcf83..988a51e 100755
--- a/devel/tools/license_tag
+++ b/devel/tools/license_tag
@@ -125,16 +125,16 @@ sub tag_mason {
         my $pmlic = $LICENSE;
         $pmlic =~ s/^/%# /mg;
         $pmlic =~ s/\s*$//mg;
-        if ($file =~ /^%# BEGIN BPS TAGGED BLOCK {{{/ms) {
+        if ($file =~ /^%# BEGIN BPS TAGGED BLOCK \{\{\{/ms) {
                 print "has license section";
-             $file =~ s/^%# BEGIN BPS TAGGED BLOCK {{{(.*?)%# END BPS TAGGED BLOCK }}}/%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}/ms;
+             $file =~ s/^%# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)%# END BPS TAGGED BLOCK \}\}\}/%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}/ms;
 
 
         } else {
                 print "no license section";
              $file ="%# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n%# END BPS TAGGED BLOCK }}}\n". $file;
         }
-        $file =~ s/%# END BPS TAGGED BLOCK }}}(\n+)/%# END BPS TAGGED BLOCK }}}\n/mg;
+        $file =~ s/%# END BPS TAGGED BLOCK \}\}\}(\n+)/%# END BPS TAGGED BLOCK }}}\n/mg;
         print "\n";
 
 
@@ -158,16 +158,16 @@ sub tag_makefile {
         my $pmlic = $LICENSE;
         $pmlic =~ s/^/# /mg;
         $pmlic =~ s/\s*$//mg;
-        if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) {
+        if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) {
                 print "has license section";
-             $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
+             $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
 
 
         } else {
                 print "no license section";
              $file ="# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}\n". $file;
         }
-        $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg;
+        $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg;
         print "\n";
 
 
@@ -192,16 +192,16 @@ sub tag_pm {
         my $pmlic = $LICENSE;
         $pmlic =~ s/^/# /mg;
         $pmlic =~ s/\s*$//mg;
-        if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) {
+        if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) {
                 print "has license section";
-             $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
+             $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
 
 
         } else {
                 print "no license section";
              $file ="# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}\n". $file;
         }
-        $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n\n/mg;
+        $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n\n/mg;
         print "\n";
 
 
@@ -226,9 +226,9 @@ sub tag_script {
         my $pmlic = $LICENSE;
         $pmlic =~ s/^/# /msg;
         $pmlic =~ s/\s*$//mg;
-        if ($file =~ /^# BEGIN BPS TAGGED BLOCK {{{/ms) {
+        if ($file =~ /^# BEGIN BPS TAGGED BLOCK \{\{\{/ms) {
                 print "has license section";
-             $file =~ s/^# BEGIN BPS TAGGED BLOCK {{{(.*?)# END BPS TAGGED BLOCK }}}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
+             $file =~ s/^# BEGIN BPS TAGGED BLOCK \{\{\{(.*?)# END BPS TAGGED BLOCK \}\}\}/# BEGIN BPS TAGGED BLOCK {{{\n$pmlic\n# END BPS TAGGED BLOCK }}}/ms;
 
 
         } else {
@@ -240,7 +240,7 @@ sub tag_script {
 
                 }
         }
-        $file =~ s/# END BPS TAGGED BLOCK }}}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg;
+        $file =~ s/# END BPS TAGGED BLOCK \}\}\}(\n+)/# END BPS TAGGED BLOCK }}}\n/mg;
         print "\n";
 
 
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index dce1117..4ff3c1f 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -3143,7 +3143,7 @@ sub GetColumnMapEntry {
     }
 
     # complex things
-    elsif ( my ( $mainkey, $subkey ) = $args{'Name'} =~ /^(.*?)\.{(.+)}$/ ) {
+    elsif ( my ( $mainkey, $subkey ) = $args{'Name'} =~ /^(.*?)\.\{(.+)\}$/ ) {
         return undef unless $args{'Map'}->{$mainkey};
         return $args{'Map'}{$mainkey}{ $args{'Attribute'} }
             unless ref $args{'Map'}{$mainkey}{ $args{'Attribute'} } eq 'CODE';
diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm
index b73bbaa..d811e03 100644
--- a/lib/RT/Report/Tickets.pm
+++ b/lib/RT/Report/Tickets.pm
@@ -111,7 +111,7 @@ sub Groupings {
 sub Label {
     my $self = shift;
     my $field = shift;
-    if ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) {
+    if ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) {
         my $cf = $1;
         return $self->CurrentUser->loc( "Custom field '[_1]'", $cf ) if $cf =~ /\D/;
         my $obj = RT::CustomField->new( $self->CurrentUser );
@@ -239,7 +239,7 @@ sub _FieldToFunction {
             $func = "SUBSTR($func,1,4)";
         }
         $args{'FUNCTION'} = $func;
-    } elsif ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) { #XXX: use CFDecipher method
+    } elsif ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) { #XXX: use CFDecipher method
         my $cf_name = $1;
         my $cf = RT::CustomField->new( $self->CurrentUser );
         $cf->Load($cf_name);
diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index 116a4e2..21f04a3 100644
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -1317,8 +1317,8 @@ Try and turn a CF descriptor into (cfid, cfname) object pair.
 sub _CustomFieldDecipher {
     my ($self, $string) = @_;
 
-    my ($queue, $field, $column) = ($string =~ /^(?:(.+?)\.)?{(.+)}(?:\.(Content|LargeContent))?$/);
-    $field ||= ($string =~ /^{(.*?)}$/)[0] || $string;
+    my ($queue, $field, $column) = ($string =~ /^(?:(.+?)\.)?\{(.+)\}(?:\.(Content|LargeContent))?$/);
+    $field ||= ($string =~ /^\{(.*?)\}$/)[0] || $string;
 
     my $cf;
     if ( $queue ) {
diff --git a/share/html/REST/1.0/Forms/ticket/default b/share/html/REST/1.0/Forms/ticket/default
index 0bced1e..046cc25 100644
--- a/share/html/REST/1.0/Forms/ticket/default
+++ b/share/html/REST/1.0/Forms/ticket/default
@@ -416,14 +416,14 @@ else {
                             $s =~ s/\\'/'/g;
                             push @new, $s;
                         }
-                        elsif ( $a =~ /^q{/ ) {
+                        elsif ( $a =~ /^q\{/ ) {
                             my $s = $a;
-                            while ( $a !~ /}$/ ) {
+                            while ( $a !~ /\}$/ ) {
                                 ( $a, $b ) = split /\s*,\s*/, $b, 2;
                                 $s .= ',' . $a;
                             }
-                            $s =~ s/^q{//;
-                            $s =~ s/}//;
+                            $s =~ s/^q\{//;
+                            $s =~ s/\}//;
                             push @new, $s;
                         }
                         else {
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index e377622..6ac285b 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -190,7 +190,7 @@ my @new_values = ();
 
 # Try to find if we're adding a clause
 foreach my $arg ( keys %ARGS ) {
-    next unless $arg =~ m/^ValueOf(\w+|'CF.{.*?}')$/
+    next unless $arg =~ m/^ValueOf(\w+|'CF\.\{.*?\}')$/
                 && ( ref $ARGS{$arg} eq "ARRAY"
                      ? grep $_ ne '', @{ $ARGS{$arg} }
                      : $ARGS{$arg} ne '' );
@@ -234,7 +234,7 @@ foreach my $arg ( keys %ARGS ) {
             $value = "'$value'";
         }
 
-        if ($keyword =~ /^'CF\.{(.*)}'/) {
+        if ($keyword =~ /^'CF\.\{(.*)\}'/) {
             my $cf = $1;
             $cf =~ s/(['\\])/\\$1/g;
             $keyword = "'CF.{$cf}'";
diff --git a/share/html/Search/Chart.html b/share/html/Search/Chart.html
index 6ec5789..6e86d4b 100644
--- a/share/html/Search/Chart.html
+++ b/share/html/Search/Chart.html
@@ -55,7 +55,7 @@ $ARGS{Query} ||= 'id > 0';
 
 # FIXME: should be factored with RT::Report::Tickets::Label :(
 my $PrimaryGroupByLabel;
-if ( $PrimaryGroupBy =~ /^(?:CF|CustomField)\.{(.*)}$/ ) {
+if ( $PrimaryGroupBy =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) {
     my $cf = $1;
     if ( $cf =~ /\D/ ) {
         $PrimaryGroupByLabel = loc( "custom field '[_1]'", $cf );
diff --git a/t/99-policy.t b/t/99-policy.t
index 1980e34..a7b0675 100644
--- a/t/99-policy.t
+++ b/t/99-policy.t
@@ -58,9 +58,9 @@ sub check {
                 and ($content =~ /\b(copyright|GPL|Public Domain)\b/i
                   or /\(c\)\s+\d\d\d\d(?:-\d\d\d\d)?/i);
         if ($check{bps_tag} == 1) {
-            like( $content, qr/[B]EGIN BPS TAGGED BLOCK {{{/, "$file has BPS license tag");
+            like( $content, qr/[B]EGIN BPS TAGGED BLOCK \{\{\{/, "$file has BPS license tag");
         } elsif ($check{bps_tag} == -1) {
-            unlike( $content, qr/[B]EGIN BPS TAGGED BLOCK {{{/, "$file has no BPS license tag");
+            unlike( $content, qr/[B]EGIN BPS TAGGED BLOCK \{\{\{/, "$file has no BPS license tag");
         }
     }
 
diff --git a/t/api/action-createtickets.t b/t/api/action-createtickets.t
index c37e2ed..ceed423 100644
--- a/t/api/action-createtickets.t
+++ b/t/api/action-createtickets.t
@@ -105,7 +105,7 @@ is ($dependson->FirstCustomFieldValue('GlobalCF'), 'A Value',
   'global custom field was set');
 is ($dependson->FirstCustomFieldValue('QueueCF'), 'Another Value',
   'queue custom field was set');
-unlike ($dependson->Subject, qr/{/, "The subject doesn't have braces in it. that means we're interpreting expressions");
+unlike ($dependson->Subject, qr/\{/, "The subject doesn't have braces in it. that means we're interpreting expressions");
 is ($t->ReferredToBy->Count,1, "It's only referred to by one other ticket");
 is ($t->ReferredToBy->First->BaseObj->Id,$t->DependsOn->First->TargetObj->Id, "The same ticket that depends on it refers to it.");
 use RT::Action::CreateTickets;
diff --git a/t/fts/indexed_mysql.t b/t/fts/indexed_mysql.t
index c124ff8..a54382f 100644
--- a/t/fts/indexed_mysql.t
+++ b/t/fts/indexed_mysql.t
@@ -41,7 +41,7 @@ sub setup_indexing {
     mkdir $tmp;
 
     my $sphinx_conf = $output;
-    $sphinx_conf =~ s/.*?source rt {/source rt {/ms;
+    $sphinx_conf =~ s/.*?source rt \{/source rt {/ms;
     $sphinx_conf =~ s{\Q$RT::VarPath\E/sphinx/}{$tmp/}g;
 
     $sphinx{'config'} = File::Spec->catfile( $tmp, 'sphinx.conf' );
diff --git a/t/web/articles-links.t b/t/web/articles-links.t
index 713dc05..eb6de51 100644
--- a/t/web/articles-links.t
+++ b/t/web/articles-links.t
@@ -37,7 +37,7 @@ $m->content_contains('instance of ticket #17421', 'got the name of the article i
 # delete RT::Article's Name method on the server so we'll need to AUTOLOAD it
 my $clone = $m->clone;
 $clone->get_ok('/delete-article-name-method.html');
-like($clone->content, qr/{deleted}/);
+like($clone->content, qr/\{deleted\}/);
 
 $m->form_name('TicketUpdate');
 $m->click('SubmitTicket');
diff --git a/t/web/command_line.t b/t/web/command_line.t
index 7c444f4..a5c52d2 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -164,106 +164,106 @@ expect_like(qr/Queue: EditedQueue$$/, 'Verified lack of change');
 
 # Test reading and setting custom fields without spaces
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking initial value');
-expect_like(qr/CF\.{myCF$$}:/i, 'Verified initial empty value (CF-x syntax)');
+expect_like(qr/\QCF.{myCF$$}\E:/i, 'Verified initial empty value (CF-x syntax)');
 expect_send("show ticket/$ticket_id -f CF.{myCF$$}", 'Checking initial value');
-expect_like(qr/CF\.{myCF$$}:/i, 'Verified initial empty value (CF.{x} syntax)');
+expect_like(qr/\QCF.{myCF$$}\E:/i, 'Verified initial empty value (CF.{x} syntax)');
 
 expect_send("edit ticket/$ticket_id set 'CF-myCF$$=VALUE' ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: VALUE/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: VALUE/i, 'Verified change');
 # Test setting 0 as value of the custom field
 expect_send("edit ticket/$ticket_id set 'CF-myCF$$=0' ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: 0/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: 0/i, 'Verified change');
 
 expect_send("edit ticket/$ticket_id set 'CF.{myCF$$}=VALUE' ",'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF.{myCF$$}", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: VALUE/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: VALUE/i, 'Verified change');
 # Test setting 0 as value of the custom field
 expect_send("edit ticket/$ticket_id set 'CF.{myCF$$}=0' ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF.{myCF$$}", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: 0/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: 0/i, 'Verified change');
 
 # Test reading and setting custom fields with spaces
 expect_send("show ticket/$ticket_id -f 'CF-my CF$$'", 'Checking initial value');
-expect_like(qr/CF\.{my CF$$}:/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E:/i, 'Verified change');
 expect_send("edit ticket/$ticket_id set 'CF-my CF$$=VALUE' ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f 'CF-my CF$$'", 'Checking new value');
-expect_like(qr/CF\.{my CF$$}: VALUE/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E: VALUE/i, 'Verified change');
 expect_send("ls -l 'id = $ticket_id' -f 'CF-my CF$$'", 'Checking new value');
-expect_like(qr/CF\.{my CF$$}: VALUE/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E: VALUE/i, 'Verified change');
 
 expect_send("show ticket/$ticket_id -f 'CF.{my CF$$}'", 'Checking initial value');
-expect_like(qr/CF\.{my CF$$}: VALUE/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E: VALUE/i, 'Verified change');
 expect_send("edit ticket/$ticket_id set 'CF.{my CF$$}=NEW' ", 'Changing CF...');
 expect_send("show ticket/$ticket_id -f 'CF.{my CF$$}'", 'Checking new value');
-expect_like(qr/CF\.{my CF$$}: NEW/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E: NEW/i, 'Verified change');
 expect_send("ls -l 'id = $ticket_id' -f 'CF.{my CF$$}'", 'Checking new value');
-expect_like(qr/CF\.{my CF$$}: NEW/i, 'Verified change');
+expect_like(qr/\QCF.{my CF$$}\E: NEW/i, 'Verified change');
 
 # Test reading and setting single value custom field with commas or quotes
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking initial value');
-expect_like(qr/CF\.{myCF$$}:/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E:/i, 'Verified change');
 expect_send("edit ticket/$ticket_id set CF-myCF$$=1,2,3", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: 1,2,3/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: 1,2,3/i, 'Verified change');
 expect_send("edit ticket/$ticket_id set CF-myCF$$=\"1's,2,3\"", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
 expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking new value');
-expect_like(qr/CF\.{myCF$$}: 1's,2,3/i, 'Verified change');
+expect_like(qr/\QCF.{myCF$$}\E: 1's,2,3/i, 'Verified change');
 
 # Test reading and setting custom fields with multiple values
 expect_send("show ticket/$ticket_id -f CF-MultipleCF$$", 'Checking initial value');
-expect_like(qr/CF\.{MultipleCF$$}:/i, 'Verified multiple cf change');
+expect_like(qr/\QCF.{MultipleCF$$}\E:/i, 'Verified multiple cf change');
 expect_send("edit ticket/$ticket_id set CF.{MultipleCF$$}=1,2,3 ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: 1,\s*2,\s*3/i, 'Verified multiple cf change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: 1,\s*2,\s*3/i, 'Verified multiple cf change');
 expect_send("edit ticket/$ticket_id set CF.{MultipleCF$$}=a,b,c ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: a,\s*b,\s*c/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: a,\s*b,\s*c/i, 'Verified change');
 expect_send("edit ticket/$ticket_id del CF.{MultipleCF$$}=a", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'del multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: b,\s*c/i, 'Verified multiple cf change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: b,\s*c/i, 'Verified multiple cf change');
 expect_send("edit ticket/$ticket_id add CF.{MultipleCF$$}=o", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: b,\s*c,\s*o/i, 'Verified multiple cf change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: b,\s*c,\s*o/i, 'Verified multiple cf change');
 
 expect_send("edit ticket/$ticket_id set CF.{MultipleCF$$}=\"'a,b,c'\" ", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: 'a,b,c'/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: 'a,b,c'/i, 'Verified change');
 expect_send("edit ticket/$ticket_id del CF.{MultipleCF$$}=a", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: 'a,b,c'/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: 'a,b,c'/i, 'Verified change');
 
 expect_send("edit ticket/$ticket_id set CF.{MultipleCF$$}=q{a,b,c}", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: 'a,b,c'/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: 'a,b,c'/i, 'Verified change');
 expect_send("edit ticket/$ticket_id del CF.{MultipleCF$$}=a", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: 'a,b,c'/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: 'a,b,c'/i, 'Verified change');
 expect_send("edit ticket/$ticket_id del CF.{MultipleCF$$}=\"'a,b,c'\"", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: \s*$/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: \s*$/i, 'Verified change');
 
 expect_send("edit ticket/$ticket_id set CF.{MultipleCF$$}=\"q{1,2's,3}\"", 'Changing CF...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed multiple cf');
 expect_send("show ticket/$ticket_id -f CF.{MultipleCF$$}", 'Checking new value');
-expect_like(qr/CF\.{MultipleCF$$}: '1,2\\'s,3'/i, 'Verified change');
+expect_like(qr/\QCF.{MultipleCF$$}\E: '1,2\\'s,3'/i, 'Verified change');
 
 # ...
 # change a ticket's ...[other properties]...
diff --git a/t/web/command_line_cf_edge_cases.t b/t/web/command_line_cf_edge_cases.t
index d7c7777..33e5c3e 100644
--- a/t/web/command_line_cf_edge_cases.t
+++ b/t/web/command_line_cf_edge_cases.t
@@ -43,14 +43,14 @@ qq{create -t ticket set subject='test cf $name' 'CF.{$name}=foo:b a.r=baz'},
 
     expect_send( "show ticket/$ticket_id -f 'CF.{$name}'",
         'checking new value' );
-    expect_like( qr/CF\.{\Q$name\E}: foo:b a\.r=baz/i, 'verified change' );
+    expect_like( qr/CF\.\Q{$name}\E: foo:b a\.r=baz/i, 'verified change' );
 
     expect_send( "edit ticket/$ticket_id set 'CF.{$name}=bar'",
         "changing cf $name to bar" );
     expect_like( qr/Ticket $ticket_id updated/, 'changed cf' );
     expect_send( "show ticket/$ticket_id -f 'CF.{$name}'",
         'checking new value' );
-    expect_like( qr/CF\.{\Q$name\E}: bar/i, 'verified change' );
+    expect_like( qr/CF\.\Q{$name}\E: bar/i, 'verified change' );
 
     expect_send(
 qq{create -t ticket set subject='test cf $name' 'CF-$name=foo:b a.r=baz'},
@@ -61,17 +61,17 @@ qq{create -t ticket set subject='test cf $name' 'CF-$name=foo:b a.r=baz'},
 
     expect_send( "show ticket/$ticket_id -f 'CF-$name'", 'checking new value' );
     if ( $name eq 'foo=bar' ) {
-        expect_like( qr/CF\.{\Q$name\E}: $/mi,
+        expect_like( qr/CF\.\Q{$name}\E: $/mi,
             "can't use = in cf name with old style" );
     }
     else {
-        expect_like( qr/CF\.{\Q$name\E}: foo:b a\.r=baz/i, 'verified change' );
+        expect_like( qr/CF\.\Q{$name}\E: foo:b a\.r=baz/i, 'verified change' );
         expect_send( "edit ticket/$ticket_id set 'CF-$name=bar'",
             "changing cf $name to bar" );
         expect_like( qr/Ticket $ticket_id updated/, 'changed cf' );
         expect_send( "show ticket/$ticket_id -f 'CF-$name'",
             'checking new value' );
-        expect_like( qr/CF\.{\Q$name\E}: bar/i, 'verified change' );
+        expect_like( qr/CF\.\Q{$name}\E: bar/i, 'verified change' );
     }
 }
 
diff --git a/t/web/rest_cfs_with_same_name.t b/t/web/rest_cfs_with_same_name.t
index 958f671..9ab6e9a 100644
--- a/t/web/rest_cfs_with_same_name.t
+++ b/t/web/rest_cfs_with_same_name.t
@@ -69,10 +69,10 @@ for my $queue_name (qw/foo bar/) {
         ]
     );
     $text = $m->content;
-    like( $text, qr/^CF\.{test}: baz\s*$/m, 'cf value in rest show' );
+    like( $text, qr/^CF\.\{test\}: baz\s*$/m, 'cf value in rest show' );
 
     $text =~ s{.*}{}; # remove header
-    $text =~ s!CF\.{test}: baz!CF.{test}: newbaz!;
+    $text =~ s!CF\.\{test\}: baz!CF.{test}: newbaz!;
     $m->post(
         "$baseurl/REST/1.0/ticket/edit",
         [

commit 1c288588e668fc3c21fd41b7eed8568fdb9c61c4
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 20 15:15:02 2013 -0400

    File::Temp under 5.18 warns if passed an undefined template
    
    File::Temp does not require that a defined template be provided -- if an
    even number of arguments is passed, an undef template is assumed.  This
    has been true for all versions of File::Temp, so does not break
    backcompat.
    
    Explicitly passing an undef template causes "Use of uninitialized value
    $_[0] in string eq" warnings on 5.18, so skip doing so.

diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index d4a261e..2644575 100644
--- a/lib/RT/EmailParser.pm
+++ b/lib/RT/EmailParser.pm
@@ -110,7 +110,7 @@ sub SmartParseMIMEEntityFromScalar {
             # accommodate this by pausing and retrying.
             last
               if ( $fh, $temp_file ) =
-              eval { File::Temp::tempfile( undef, UNLINK => 0 ) };
+              eval { File::Temp::tempfile( UNLINK => 0 ) };
             sleep 1;
         }
         if ($fh) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list