destroy#

Destructor for File::Temp objects - removes the underlying file when UNLINK is set and $File::Temp::KEEP_ALL is false.

Σύνοψη#

{
    my $tmp = File::Temp->new;  # UNLINK => 1 by default
}  # DESTROY runs here; file is unlinked

Τι επιστρέφεται#

Nothing - this is a destructor invoked by the runtime when the last reference drops. It is rare to call it directly.

Οριακές περιπτώσεις#

  • $File::Temp::KEEP_ALL = 1 suppresses all file removal.

  • Files not registered with cleanup tracking are left on disk.

Διαφορές από το upstream#

Fully compatible with upstream File::Temp 0.2312.

Δείτε επίσης#

  • unlink_on_destroy - per-object opt-out for the removal behavior.

  • cleanup - explicit cleanup of all registered temp entries.