You are here: Foswiki>Tasks Web>Item13749 (10 Oct 2015, GeorgeClark)Edit Attach

Item13749: Perl's "stat()" will not work with with array arg and other Perl 5.23 compatibilty issues.

pencil
Priority: Low
Current State: Closed
Released In: 2.0.2
Target Release: patch
Applies To: Engine
Component: FoswikiLogger
Branches: master
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark
In the perl v5.24 the stat (probably) will not accept array as argument. (at least 5.23.3 doesn't accepts it).

Therefore the following patch is needed:

--- a/core/lib/Foswiki/Logger/PlainFile.pm
+++ b/core/lib/Foswiki/Logger/PlainFile.pm
@@ -85,7 +85,7 @@ our %nextCheckDue = (
 # Symbols used so we can override during unit testing
 our $dontRotate = 0;
 sub _time { time() }
-sub _stat { stat(@_); }
+sub _stat { stat($_[0]); }
 
 sub new {
     my $class = shift;

or more precisely

sub _stat { @_ ? stat($_[0]) : stat() }

see: https://rt.perl.org/Ticket/Display.html?id=126162

-- JozefMojzis - 24 Sep 2015

 

ItemTemplate edit

Summary Perl's "stat()" will not work with with array arg and other Perl 5.23 compatibilty issues.
ReportedBy JozefMojzis
Codebase 2.0.1, 2.0.0, 1.1.9, trunk
SVN Range
AppliesTo Engine
Component FoswikiLogger
Priority Low
CurrentState Closed
WaitingFor
Checkins distro:7caaabe4f57e distro:50fa872a42c2
TargetRelease patch
ReleasedIn 2.0.2
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:7caaabe4f57e distro:50fa872a42c2
ItemBranchCheckins
Release01x01Checkins
Topic revision: r5 - 10 Oct 2015, GeorgeClark - This page was cached on 06 Dec 2016 - 13:29.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License