dir_unlink_on_destroy#
Toggle or query whether a File::Temp::Dir object removes its directory tree on destruction.
תקציר#
my $flag = $dir->unlink_on_destroy; # getter
$dir->unlink_on_destroy(0); # keep the tree
מה מוחזר#
The new (or current) cleanup flag as an integer.
דוגמאות#
my $dir = File::Temp->newdir;
$dir->unlink_on_destroy(0);
## $dir's path survives after $dir goes out of scope
מקרי קצה#
Called on something that is not a
File::Temp::Dir: returns0.Writes to the object’s
CLEANUPhash slot; reads by other code see the updated value.
הבדלים מן ה-upstream#
Fully compatible with upstream File::Temp 0.2312.
ראו גם#
File::Temp->newdir- constructor whose default isCLEANUP => 1.cleanup- force-drain all registered cleanups now.