[Rt-commit] rt branch, 4.0/perl-5.19.4-compat, created. rt-4.0.17-91-gad8d7a5

Alex Vandiver alexmv at bestpractical.com
Fri Sep 27 18:15:03 EDT 2013


The branch, 4.0/perl-5.19.4-compat has been created
        at  ad8d7a5e1d7741b21dd38268adeedcfbe5ed59fc (commit)

- Log -----------------------------------------------------------------
commit 3156d1b9680384fb97908dc93f63932d54d8b079
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Sep 27 11:49:33 2013 -0400

    Fix precedence errors found by perl 5.19.4 of return ... or ...

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index a7996a8..229ed38 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -956,7 +956,7 @@ not contain a slash-dot C</.>, and does not contain any nulls.
 sub ComponentPathIsSafe {
     my $self = shift;
     my $path = shift;
-    return $path !~ m{(?:^|/)\.} and $path !~ m{\0};
+    return($path !~ m{(?:^|/)\.} and $path !~ m{\0});
 }
 
 =head2 PathIsSafe
diff --git a/lib/RT/Shredder/Plugin/SQLDump.pm b/lib/RT/Shredder/Plugin/SQLDump.pm
index 2e7c259..8b7802e 100644
--- a/lib/RT/Shredder/Plugin/SQLDump.pm
+++ b/lib/RT/Shredder/Plugin/SQLDump.pm
@@ -89,8 +89,8 @@ sub Run
     my $query = $args{'Object'}->_AsInsertQuery;
     $query .= "\n" unless $query =~ /\n$/;
 
-    return print $fh $query or return (0, "Couldn't write to filehandle");
-    return 1;
+    return 1 if print $fh $query;
+    return (0, "Couldn't write to filehandle");
 }
 
 1;

commit ad8d7a5e1d7741b21dd38268adeedcfbe5ed59fc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Sep 27 11:51:17 2013 -0400

    Cwd::realpath("/nonexistant") on 5.19.4 returns undef

diff --git a/lib/RT.pm b/lib/RT.pm
index 91123b2..26af706 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -700,7 +700,9 @@ sub InitPluginPaths {
     my @tmp_inc;
     my $added;
     for (@INC) {
-        if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
+        my $realpath = Cwd::realpath($_);
+        next unless defined $realpath;
+        if ( $realpath eq $RT::LocalLibPath) {
             push @tmp_inc, $_, @lib_dirs;
             $added = 1;
         } else {

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


More information about the Rt-commit mailing list