1Level(3) User Contributed Perl Documentation Level(3)
2
3
4
6 Perl::Destruct::Level - Allow to change perl's destruction level
7
9 use Perl::Destruct::Level level => 1;
10
11 my $current_destruct_level = Perl::Destruct::Level::get_destruct_level();
12
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
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
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
44 perlrun, perlhack
45
46
47
48perl v5.34.0 2021-07-22 Level(3)