Skip Menu |

This queue is for tickets about the Bot-BasicBot-Pluggable CPAN distribution.

Report information
The Basics
Id: 68886
Status: resolved
Priority: 0/
Queue: Bot-BasicBot-Pluggable

People
Owner: Nobody in particular
Requestors: BABAR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.92
Fixed in: (no value)



Subject: Storable crashes if /tmp is on another filesystem as cwd
If /tmp (default directory used by File::Temp) is on another partition than the current working directory, any attempt to store a value with Storable as a backend results in a crash, with no useful error message. This patch adds the actual error to the message, and forces File::Temp to use the same directory as the final file to create its temporary file: --- /usr/local/share/perl/5.10.1/Bot/BasicBot/Pluggable/Store/Storable.pm 2011-06-17 08:46:08.687423901 +0200 +++ /usr/local/share/perl/5.10.1/Bot/BasicBot/Pluggable/Store/Storable.pm*.save 2011-06-12 10:13:06.000000000 +0200 @@ -24,18 +24,18 @@ for my $name (@modules) { my $filename = File::Spec->catfile( $self->{dir}, $name . ".storable" ); - my ( $fh, $tempfile ) = tempfile( DIR => $self->{dir}, UNLINK => 0 ); + my ( $fh, $tempfile ) = tempfile( UNLINK => 0 ); nstore( $self->{store}{$name}, $tempfile ) or die "Cannot save to $tempfile\n"; rename $tempfile, $filename - or die "Cannot create $filename: $!\n"; + or die "Cannot create $filename\n"; } }
Thanks for the patch. I just released 0.93 to the CPAN.