in reply to File::Temp does not cleanup() on demand
tempdirThis is the recommended interface for creation of temporary directories. By default the directory will not be removed on exit (that is, it won't be temporary; this behaviour can not be changed because of issues with backwards compatibility). To enable removal either use the CLEANUP option which will trigger removal on program exit, or consider using the newdir method in the object interface which will allow the directory to be cleaned up when the object goes out of scope.
So the important part of the documentation you cited was that are registered for removal. The directory your code created was not registered for removal. To register it, create it with
my $x = tempdir(CLEANUP => 1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File::Temp does not cleanup() on demand
by bliako (Abbot) on Oct 05, 2023 at 13:36 UTC | |
by choroba (Cardinal) on Oct 05, 2023 at 13:40 UTC | |
by bliako (Abbot) on Oct 05, 2023 at 13:48 UTC | |
by swl (Prior) on Oct 05, 2023 at 21:48 UTC |