Opened 3 years ago

Last modified 3 years ago

#1345 new defect

actionqueue=internal.dump_padre is writing to a closed filehandle.

Reported by: gyles19 Owned by:
Priority: major Milestone:
Component: not classified yet Version: 0.90
Keywords: Cc:

Description

joi@tardis:~/projects/Pavlov/Pavlov-AutoDialer?$ padre --actionqueue=internal.dump_padre /tmp/foo
print() on closed filehandle $dumpfh at /usr/local/share/perl/5.10.1/Padre/Wx/ActionLibrary.pm line 100.
Scalars leaked: 1
Scalars leaked: 1
Scalars leaked: 1

The handler for this action is localizing the filehandle within the open itself, so it goes out of scope before the print can be performed.

Attachments (1)

ActionLibrary.patch (829 bytes) - added by gyles19 3 years ago.
Patch that works on Ubuntu, for me.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by gyles19

Patch that works on Ubuntu, for me.

comment:1 Changed 3 years ago by gyles19

I've noticed that Padre::Constant::PADRE_HOME is empty on my system. This is causing the attempt to open the file to go to /padre.dump, which will always fail on an *nix system unless the user is root.

I created a patch that corrects the scope problem on the file handle, uses File::Spec->tmpdir to find a place to write the thing, and then tells you where it is.

_find_padre_home does not appear to be working on Ubuntu.

Note: See TracTickets for help on using tickets.