On some versions of Perl, using File::Temp->tempfile gives the error:
'tempfile' can't be called as a method at -e line 1.
which is true because tempfile shouldn't be used as a method.
This patch fixes the occurrences in the po4a-0.44 source.
Note this reveals a subtle bug too. There was some code which did:
File::Temp->tempfile ($filename, ...)
In this case, the first arg to the "method" tempfile is the File::Temp
object, so AFAICT the $filename is being ignored or at least not used
correctly. In this case $filename contained a full path like
"po/pod/foo". If you fix the method bug, $filename is suddenly being
used for the first time, and since it contains a full path, the
program breaks (because the parent directories don't exist).
Therefore I replaced that code with:
$basename = basename ($filename);
File::Temp::tempfile ($basename, ...)
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org