Skip to content

"Cannot call tempfile as a method of File::Temp" #244

@Ytterbrium

Description

@Ytterbrium

When trying to compile SDL I get the error message:

"tempfile' can't be called as a method at C:/strawberry/perl/site/lib/Alien/SDL.pm line 243."

The offending line is:

243 my ($fs, $src) = File::Temp->tempfile('XXXXaa', SUFFIX => '.c', UNLINK => 1);

According to the File::Temp changelog for the latest version V0.23

http://cpansearch.perl.org/src/TJENNESS/File-Temp-0.23/ChangeLog

  • Temp.pm: Calling tempfile or tempdir as a class method now
    produce a more useful fatal error message

It must have failed silently before, allowing compilation and install. I do not know enough to fix this myself. I have resorted to installing an earlier version of File::Temp V0.22 and everything just works.

This is also a problem on Alien::SDL, Alien::SDL2 and SDL2, possibly other modules.

Many thanks for making this great module available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions