POD and code fix for Storage object delete method

This commit is contained in:
Colin Kuskie 2006-05-17 18:28:31 +00:00
parent c6342a6225
commit ebdcd47f8d
2 changed files with 3 additions and 6 deletions

View file

@ -369,7 +369,7 @@ sub createTemp {
=head2 delete ( )
Deletes this storage location and its contents (if any) from the filesystem and destroy's the object.
Deletes this storage location and its contents (if any) from the filesystem.
=cut
@ -377,7 +377,7 @@ sub delete {
my $self = shift;
my $path = $self->getPath;
rmtree($path) if ($path);
undef $self;
return;
}
#-------------------------------------------------------------------

View file

@ -18,7 +18,7 @@ use WebGUI::Storage;
use Test::More;
plan tests => 9; # increment this value for each test you create
plan tests => 7; # increment this value for each test you create
my $session = WebGUI::Test->session;
@ -46,9 +46,6 @@ ok( (-e $storageDir1 and -d $storageDir1), "Storage location created and is a di
$storage1->delete;
is ( $storage1, undef, 'Object undeffed');
is ( ref $storage1, 'SCALAR', 'Object undeffed');
END {
ref $storage1 eq "WebGUI::Storage" and $storage1->delete;
}