Subject: | Bug in Interp.pm causes test to fail on Windows |
Okay - its really a bug in Windows, but... Interp.pm's remove object
directory method incorrectly assumes that you can rename foo to bar,
where foo and bar are both existing directories. On Unix, this
helpfully puts foo inside of bar... On windows, it fails.
The following patch will address this issue:
*** Interp.pm Thu Feb 2 13:01:13 2006
--- lib/HTML/Mason/Interp.pm Tue Jan 3 12:01:00 2006
*************** sub remove_object_files
*** 553,559 ****
my $object_dir = $self->object_dir;
if (-d $object_dir) {
my $temp_dir = File::Temp::tempdir(DIR => $self->data_dir);
! rename($object_dir, File::Spec->catdir($temp_dir, "target") )
or die "could not rename '$object_dir' to '$temp_dir': $@";
$self->_make_object_dir();
rmtree($temp_dir);
--- 553,559 ----
my $object_dir = $self->object_dir;
if (-d $object_dir) {
my $temp_dir = File::Temp::tempdir(DIR => $self->data_dir);
! rename($object_dir, $temp_dir)
or die "could not rename '$object_dir' to '$temp_dir': $@";
$self->_make_object_dir();
rmtree($temp_dir);