Perl-Destruct-Level-0.02/0000755000175000017500000000000010724762526014456 5ustar rafaelrafaelPerl-Destruct-Level-0.02/t/0000755000175000017500000000000010724762526014721 5ustar rafaelrafaelPerl-Destruct-Level-0.02/t/00compile.t0000644000175000017500000000007510724032431016661 0ustar rafaelrafaeluse Test::More tests => 1; use_ok('Perl::Destruct::Level'); Perl-Destruct-Level-0.02/t/01level0.t0000644000175000017500000000016710724035005016423 0ustar rafaelrafaeluse Test::More tests => 1; use Perl::Destruct::Level level => 0; is(Perl::Destruct::Level::get_destruct_level(), 0); Perl-Destruct-Level-0.02/t/02level1.t0000644000175000017500000000016710724035016016427 0ustar rafaelrafaeluse Test::More tests => 1; use Perl::Destruct::Level level => 1; is(Perl::Destruct::Level::get_destruct_level(), 1); Perl-Destruct-Level-0.02/META.yml0000644000175000017500000000046310724762526015732 0ustar rafaelrafael# http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Perl-Destruct-Level version: 0.02 version_from: Level.pm installdirs: site requires: distribution_type: module generated_by: ExtUtils::MakeMaker version 6.30_01 Perl-Destruct-Level-0.02/Level.pm0000644000175000017500000000340310724762216016057 0ustar rafaelrafaelpackage Perl::Destruct::Level; use strict; use warnings; use XSLoader (); our $VERSION = '0.02'; XSLoader::load 'Perl::Destruct::Level', $VERSION; sub import { shift; my %p = @_; set_destruct_level($p{level}) if exists $p{level}; } 1; __END__ =head1 NAME Perl::Destruct::Level - Allow to change perl's destruction level =head1 SYNOPSIS use Perl::Destruct::Level level => 1; my $current_destruct_level = Perl::Destruct::Level::get_destruct_level(); =head1 DESCRIPTION This module allows to change perl's internal I. The default value of the destruct level is 0; it means that perl won't bother destroying all its internal data structures, but let the OS do the cleanup for it at exit. For perls built with debugging support (C<-DDEBUGGING>), an environment variable C allows to control the destruction level. This modules enables to modify it on non-debugging perls too. Relevant values recognized by perl are 1 and 2. Consult your source code to know exactly what they mean. Note that some embedded environments might extend the meaning of the destruction level for their own purposes: mod_perl does that, for example. =head1 CAVEATS This module won't work when used from within an END block. Loading the C module will set the destruction level to 2. (This is to enable spawned threads to properly cleanup their objects.) Loading modules that load C, even if they don't spawn threads, will also set the destruction level to 2. (A common example of such a module is C.) =head1 AUTHOR Copyright (c) 2007 Rafael Garcia-Suarez. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L =cut Perl-Destruct-Level-0.02/MANIFEST0000644000175000017500000000014610724762424015605 0ustar rafaelrafaelLevel.pm Level.xs Makefile.PL MANIFEST MANIFEST.SKIP META.yml t/00compile.t t/01level0.t t/02level1.t Perl-Destruct-Level-0.02/MANIFEST.SKIP0000644000175000017500000000001210724762310016334 0ustar rafaelrafael\B\.git\b Perl-Destruct-Level-0.02/Level.xs0000644000175000017500000000051210724035357016072 0ustar rafaelrafael#include "EXTERN.h" #include "perl.h" #include "XSUB.h" MODULE = Perl::Destruct::Level PACKAGE = Perl::Destruct::Level PREFIX = pdl_ PROTOTYPES: DISABLE void pdl_set_destruct_level(dl) U8 dl CODE: PL_perl_destruct_level = dl; U8 pdl_get_destruct_level() CODE: RETVAL = PL_perl_destruct_level; OUTPUT: RETVAL Perl-Destruct-Level-0.02/Makefile.PL0000644000175000017500000000031010724031771016411 0ustar rafaelrafaeluse 5.008; use strict; use ExtUtils::MakeMaker; WriteMakefile( AUTHOR => 'Rafael Garcia-Suarez ', NAME => 'Perl::Destruct::Level', VERSION_FROM => 'Level.pm', );