1Level(3)              User Contributed Perl Documentation             Level(3)
2
3
4

NAME

6       Perl::Destruct::Level - Allow to change perl's destruction level
7

SYNOPSIS

9           use Perl::Destruct::Level level => 1;
10
11           my $current_destruct_level = Perl::Destruct::Level::get_destruct_level();
12

DESCRIPTION

14       This module allows to change perl's internal destruction level.
15
16       The default value of the destruct level is 0; it means that perl won't
17       bother destroying all its internal data structures, but let the OS do
18       the cleanup for it at exit.
19
20       For perls built with debugging support ("-DDEBUGGING"), an environment
21       variable "PERL_DESTRUCT_LEVEL" allows to control the destruction level.
22       This modules enables to modify it on non-debugging perls too.
23
24       Relevant values recognized by perl are 1 and 2. Consult your source
25       code to know exactly what they mean. Note that some embedded
26       environments might extend the meaning of the destruction level for
27       their own purposes: mod_perl does that, for example.
28

CAVEATS

30       This module won't work when used from within an END block.
31
32       Loading the "threads" module will set the destruction level to 2. (This
33       is to enable spawned threads to properly cleanup their objects.)
34       Loading modules that load "threads", even if they don't spawn threads,
35       will also set the destruction level to 2. (A common example of such a
36       module is "Test::Builder".)
37

AUTHOR

39       Copyright (c) 2007 Rafael Garcia-Suarez. This program is free software;
40       you may redistribute it and/or modify it under the same terms as Perl
41       itself.
42

SEE ALSO

44       perlrun, perlhack
45
46
47
48perl v5.36.0                      2023-01-20                          Level(3)
Impressum