You are here: Foswiki>Tasks Web>Item12509 (19 Oct 2013, GeorgeClark)Edit Attach

Item12509: File::Temp->tempfile - not works in 5.16

pencil
Priority: Urgent
Current State: Duplicate
Released In: 1.1.9
Target Release: patch
Applies To: Engine
Component: FoswikiSandbox
Branches:
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark

File::Temp changes in the perl 5.16

In the Sandbox.pm contains

    use File::Temp ();        #line 37

    ....

    my ( $fh, $stderrCache ) = File::Temp->tempfile(    #line 506

In the standard 5.16 installation, the "tempfile" isn't callable as package method.

test with 5.12:
$ /usr/bin/perl -MFile::Temp -MData::Dumper -E 'say Dumper( File::Temp->tempfile("aaaa.XXXX"));'
$VAR1 = \*{'File::Temp::$fh'};
$VAR2 = '/var/folders/7l/nhyscwy14bjb_sxr_t2gynpm0000gn/T/NQyt0wEspa';

$ /usr/bin/perl -v
This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

test with 5.16.2:
$ perl -MFile::Temp -MData::Dumper -E 'say Dumper( File::Temp->tempfile("aaaa.XXXX"));'
'tempfile' can't be called as a method at -e line 1.

$ perl -v
This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-2level

The fix is easy:
    use File::Temp qw(tempfile);        #line 37

    ....

    my ( $fh, $stderrCache ) = tempfile(    #line 506

-- JozefMojzis - 28 May 2013

Duplicate. Item12414 Already fixed for 1.1.9. Listed in KnownIssuesOfFoswiki01x01

-- GeorgeClark - 29 May 2013
 

ItemTemplate edit

Summary File::Temp->tempfile - not works in 5.16
ReportedBy JozefMojzis
Codebase 1.1.8
SVN Range
AppliesTo Engine
Component FoswikiSandbox
Priority Urgent
CurrentState Duplicate
WaitingFor
Checkins
TargetRelease patch
ReleasedIn 1.1.9
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r4 - 19 Oct 2013, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy