r34477 - in /branches/upstream/libperl-destruct-level-perl: ./ current/ current/t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Apr 30 19:30:44 UTC 2009


Author: jawnsy-guest
Date: Thu Apr 30 19:30:39 2009
New Revision: 34477

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34477
Log:
[svn-inject] Installing original source of libperl-destruct-level-perl

Added:
    branches/upstream/libperl-destruct-level-perl/
    branches/upstream/libperl-destruct-level-perl/current/
    branches/upstream/libperl-destruct-level-perl/current/Level.pm
    branches/upstream/libperl-destruct-level-perl/current/Level.xs
    branches/upstream/libperl-destruct-level-perl/current/MANIFEST
    branches/upstream/libperl-destruct-level-perl/current/MANIFEST.SKIP
    branches/upstream/libperl-destruct-level-perl/current/META.yml
    branches/upstream/libperl-destruct-level-perl/current/Makefile.PL
    branches/upstream/libperl-destruct-level-perl/current/t/
    branches/upstream/libperl-destruct-level-perl/current/t/00compile.t
    branches/upstream/libperl-destruct-level-perl/current/t/01level0.t
    branches/upstream/libperl-destruct-level-perl/current/t/02level1.t

Added: branches/upstream/libperl-destruct-level-perl/current/Level.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/Level.pm?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/Level.pm (added)
+++ branches/upstream/libperl-destruct-level-perl/current/Level.pm Thu Apr 30 19:30:39 2009
@@ -1,0 +1,67 @@
+package 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<destruction level>.
+
+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<PERL_DESTRUCT_LEVEL> 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<threads> module will set the destruction level to 2. (This
+is to enable spawned threads to properly cleanup their objects.) Loading
+modules that load C<threads>, even if they don't spawn threads, will
+also set the destruction level to 2. (A common example of such a module
+is C<Test::Builder>.)
+
+=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<perlrun>, L<perlhack>
+
+=cut

Added: branches/upstream/libperl-destruct-level-perl/current/Level.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/Level.xs?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/Level.xs (added)
+++ branches/upstream/libperl-destruct-level-perl/current/Level.xs Thu Apr 30 19:30:39 2009
@@ -1,0 +1,19 @@
+#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

Added: branches/upstream/libperl-destruct-level-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/MANIFEST?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/MANIFEST (added)
+++ branches/upstream/libperl-destruct-level-perl/current/MANIFEST Thu Apr 30 19:30:39 2009
@@ -1,0 +1,9 @@
+Level.pm
+Level.xs
+Makefile.PL
+MANIFEST
+MANIFEST.SKIP
+META.yml
+t/00compile.t
+t/01level0.t
+t/02level1.t

Added: branches/upstream/libperl-destruct-level-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/MANIFEST.SKIP?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libperl-destruct-level-perl/current/MANIFEST.SKIP Thu Apr 30 19:30:39 2009
@@ -1,0 +1,1 @@
+\B\.git\b

Added: branches/upstream/libperl-destruct-level-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/META.yml?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/META.yml (added)
+++ branches/upstream/libperl-destruct-level-perl/current/META.yml Thu Apr 30 19:30:39 2009
@@ -1,0 +1,10 @@
+# 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

Added: branches/upstream/libperl-destruct-level-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/Makefile.PL?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/Makefile.PL (added)
+++ branches/upstream/libperl-destruct-level-perl/current/Makefile.PL Thu Apr 30 19:30:39 2009
@@ -1,0 +1,9 @@
+use 5.008;
+use strict;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    AUTHOR => 'Rafael Garcia-Suarez <rgarciasuarez at gmail.com>',
+    NAME => 'Perl::Destruct::Level',
+    VERSION_FROM => 'Level.pm',
+);

Added: branches/upstream/libperl-destruct-level-perl/current/t/00compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/t/00compile.t?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/t/00compile.t (added)
+++ branches/upstream/libperl-destruct-level-perl/current/t/00compile.t Thu Apr 30 19:30:39 2009
@@ -1,0 +1,3 @@
+use Test::More tests => 1;
+
+use_ok('Perl::Destruct::Level');

Added: branches/upstream/libperl-destruct-level-perl/current/t/01level0.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/t/01level0.t?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/t/01level0.t (added)
+++ branches/upstream/libperl-destruct-level-perl/current/t/01level0.t Thu Apr 30 19:30:39 2009
@@ -1,0 +1,5 @@
+use Test::More tests => 1;
+
+use Perl::Destruct::Level level => 0;
+
+is(Perl::Destruct::Level::get_destruct_level(), 0);

Added: branches/upstream/libperl-destruct-level-perl/current/t/02level1.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libperl-destruct-level-perl/current/t/02level1.t?rev=34477&op=file
==============================================================================
--- branches/upstream/libperl-destruct-level-perl/current/t/02level1.t (added)
+++ branches/upstream/libperl-destruct-level-perl/current/t/02level1.t Thu Apr 30 19:30:39 2009
@@ -1,0 +1,5 @@
+use Test::More tests => 1;
+
+use Perl::Destruct::Level level => 1;
+
+is(Perl::Destruct::Level::get_destruct_level(), 1);




More information about the Pkg-perl-cvs-commits mailing list