r47383 - in /trunk/libsub-uplevel-perl: Build.PL Changes MANIFEST MANIFEST.SKIP META.yml Makefile.PL README debian/changelog debian/control debian/copyright debian/rules lib/Sub/Uplevel.pm lib/Sub/Uplevel.pod t/08_exporter.t t/lib/Bar.pm t/lib/Importer.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Nov 17 21:25:07 UTC 2009
Author: jawnsy-guest
Date: Tue Nov 17 21:24:59 2009
New Revision: 47383
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=47383
Log:
* Standards-Version 3.8.3 (drop perl version dependency)
* Add myself to Uploaders and Copyright
* Use new short debhelper rules file
* Refresh copyright information
Added:
trunk/libsub-uplevel-perl/t/08_exporter.t
- copied unchanged from r47380, branches/upstream/libsub-uplevel-perl/current/t/08_exporter.t
trunk/libsub-uplevel-perl/t/lib/Bar.pm
- copied unchanged from r47380, branches/upstream/libsub-uplevel-perl/current/t/lib/Bar.pm
trunk/libsub-uplevel-perl/t/lib/Importer.pm
- copied unchanged from r47380, branches/upstream/libsub-uplevel-perl/current/t/lib/Importer.pm
Modified:
trunk/libsub-uplevel-perl/Build.PL
trunk/libsub-uplevel-perl/Changes
trunk/libsub-uplevel-perl/MANIFEST
trunk/libsub-uplevel-perl/MANIFEST.SKIP
trunk/libsub-uplevel-perl/META.yml
trunk/libsub-uplevel-perl/Makefile.PL
trunk/libsub-uplevel-perl/README
trunk/libsub-uplevel-perl/debian/changelog
trunk/libsub-uplevel-perl/debian/control
trunk/libsub-uplevel-perl/debian/copyright
trunk/libsub-uplevel-perl/debian/rules
trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pm
trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pod
Modified: trunk/libsub-uplevel-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/Build.PL?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/Build.PL (original)
+++ trunk/libsub-uplevel-perl/Build.PL Tue Nov 17 21:24:59 2009
@@ -1,31 +1,36 @@
-use 5.006;
-use strict;
-use lib 'inc';
-eval "require Pod::WikiDoc";
-my $class = $@ ? "Module::Build" : "Module::Build::WikiDoc";
-eval "require $class";
-
-$class->new(
- module_name => 'Sub::Uplevel',
- dist_author => 'David A. Golden <dagolden at cpan.org>',
- license => 'perl',
- create_readme => 1,
- create_makefile_pl => 'traditional',
- requires => {
- 'perl' => 5.006,
- },
- build_requires => {
- 'Carp' => 0,
- 'Test::More' => 0.47,
- },
- meta_add => {
- no_index => {
- package => [ 'DB' ],
- directory => [ qw{
- examples
- inc
- }],
- }
- },
-)->create_build_script;
-
+use 5.006;
+use strict;
+use lib 'inc';
+eval "require Pod::WikiDoc";
+my $class = $@ ? "Module::Build" : "Module::Build::WikiDoc";
+eval "require $class";
+
+$class->new(
+ module_name => 'Sub::Uplevel',
+ dist_author => 'David A. Golden <dagolden at cpan.org>',
+ license => 'perl',
+ create_readme => 1,
+ create_makefile_pl => 'traditional',
+ requires => {
+ 'perl' => 5.006,
+ },
+ build_requires => {
+ 'Carp' => 0,
+ 'Test::More' => 0.47,
+ },
+ meta_add => {
+ no_index => {
+ package => [ 'DB' ],
+ directory => [ qw{
+ examples
+ inc
+ }],
+ },
+ },
+ meta_merge => {
+ resources => {
+ repository => 'http://github.com/dagolden/sub-uplevel',
+ },
+ },
+)->create_build_script;
+
Modified: trunk/libsub-uplevel-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/Changes?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/Changes (original)
+++ trunk/libsub-uplevel-perl/Changes Tue Nov 17 21:24:59 2009
@@ -1,4 +1,14 @@
Changes for Sub::Uplevel
+
+0.22 Tue Nov 17 05:38:42 EST 2009
+
+ - meta: added repository to metadata [Alexandr Ciornii]
+
+0.21_01 Sat Nov 29 15:24:49 EST 2008
+
+ - added: the ":aggressive" tag may be used to force reloading of
+ Exporter, which often binds caller() prior to Sub::Uplevel's global
+ override
0.2002 Thu Sep 11 14:33:09 EDT 2008
Modified: trunk/libsub-uplevel-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/MANIFEST?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/MANIFEST (original)
+++ trunk/libsub-uplevel-perl/MANIFEST Tue Nov 17 21:24:59 2009
@@ -18,7 +18,10 @@
t/05_honor_prior_override.t
t/06_db_args.t
t/07_uplevel_too_high.t
+t/08_exporter.t
+t/lib/Bar.pm
t/lib/Foo.pm
+t/lib/Importer.pm
Todo
xt/critic.t
xt/perlcriticrc
Modified: trunk/libsub-uplevel-perl/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/MANIFEST.SKIP?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/MANIFEST.SKIP (original)
+++ trunk/libsub-uplevel-perl/MANIFEST.SKIP Tue Nov 17 21:24:59 2009
@@ -16,6 +16,7 @@
# Module::Build
^Build$
^_build
+^MYMETA
# Temp, old, vi and emacs files.
~$
Modified: trunk/libsub-uplevel-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/META.yml?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/META.yml (original)
+++ trunk/libsub-uplevel-perl/META.yml Tue Nov 17 21:24:59 2009
@@ -1,30 +1,33 @@
---
-name: Sub-Uplevel
-version: 0.2002
+abstract: 'apparently run a function in a higher stack frame'
author:
- 'David A. Golden <dagolden at cpan.org>'
-abstract: apparently run a function in a higher stack frame
-license: perl
-resources:
- license: http://dev.perl.org/licenses/
-requires:
- perl: 5.006
build_requires:
Carp: 0
Test::More: 0.47
-provides:
- DB:
- file: lib/Sub/Uplevel.pm
- Sub::Uplevel:
- file: lib/Sub/Uplevel.pm
- version: 0.2002
-generated_by: Module::Build version 0.280801
+configure_requires:
+ Module::Build: 0.35
+generated_by: 'Module::Build version 0.3508'
+license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Sub-Uplevel
no_index:
directory:
- examples
- inc
package:
- DB
+provides:
+ DB:
+ file: lib/Sub/Uplevel.pm
+ Sub::Uplevel:
+ file: lib/Sub/Uplevel.pm
+ version: 0.22
+requires:
+ perl: 5.006
+resources:
+ license: http://dev.perl.org/licenses/
+ repository: http://github.com/dagolden/sub-uplevel
+version: 0.22
Modified: trunk/libsub-uplevel-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/Makefile.PL?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/Makefile.PL (original)
+++ trunk/libsub-uplevel-perl/Makefile.PL Tue Nov 17 21:24:59 2009
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+# Note: this file was auto-generated by Module::Build::Compat version 0.35_08
require 5.006;
use ExtUtils::MakeMaker;
WriteMakefile
Modified: trunk/libsub-uplevel-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/README?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/README (original)
+++ trunk/libsub-uplevel-perl/README Tue Nov 17 21:24:59 2009
@@ -2,7 +2,7 @@
Sub::Uplevel - apparently run a function in a higher stack frame
VERSION
- This documentation describes version 0.2002
+ This documentation describes version 0.22
SYNOPSIS
use Sub::Uplevel;
@@ -33,7 +33,7 @@
caller($frames) it will actually give caller($frames + $num_frames)
for them.
- "uplevel(1, \&some_func, @_)" is effectively "goto &some_func" but
+ `uplevel(1, \&some_func, @_)' is effectively `goto &some_func' but
you don't immediately exit the current subroutine. So while you
can't do this:
@@ -52,7 +52,7 @@
return @out;
}
- "uplevel" will issue a warning if $num_frames is more than the
+ `uplevel' will issue a warning if `$num_frames' is more than the
current call stack depth.
EXAMPLE
@@ -73,7 +73,8 @@
BUGS and CAVEATS
Well, the bad news is uplevel() is about 5 times slower than a normal
- function call. XS implementation anyone?
+ function call. XS implementation anyone? It also slows down every
+ invocation of caller(), regardless of whether uplevel() is in effect.
Sub::Uplevel overrides CORE::GLOBAL::caller temporarily for the scope of
each uplevel call. It does its best to work with any previously existing
@@ -82,6 +83,20 @@
However, if you are routinely using multiple modules that override
CORE::GLOBAL::caller, you are probably asking for trouble.
+
+ You should load Sub::Uplevel as early as possible within your program.
+ As with all CORE::GLOBAL overloading, the overload will not affect
+ modules that have already been compiled prior to the overload. One
+ module that often is unavoidably loaded prior to Sub::Uplevel is
+ Exporter. To forceably recompile Exporter (and Exporter::Heavy) after
+ loading Sub::Uplevel, use it with the ":aggressive" tag:
+
+ use Sub::Uplevel qw/:aggressive/;
+
+ The private function `Sub::Uplevel::_force_reload()' may be passed a
+ list of additional modules to reload if ":aggressive" is not aggressive
+ enough. Reloading modules may break things, so only use this as a last
+ resort.
As of version 0.20, Sub::Uplevel requires Perl 5.6 or greater.
Modified: trunk/libsub-uplevel-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/debian/changelog?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/debian/changelog (original)
+++ trunk/libsub-uplevel-perl/debian/changelog Tue Nov 17 21:24:59 2009
@@ -2,6 +2,10 @@
[ Jonathan Yu ]
* New upstream release
+ * Standards-Version 3.8.3 (drop perl version dependency)
+ * Add myself to Uploaders and Copyright
+ * Use new short debhelper rules file
+ * Refresh copyright information
[ gregor herrmann ]
* debian/control: Added: ${misc:Depends} to Depends: field.
Modified: trunk/libsub-uplevel-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/debian/control?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/debian/control (original)
+++ trunk/libsub-uplevel-perl/debian/control Tue Nov 17 21:24:59 2009
@@ -1,13 +1,12 @@
Source: libsub-uplevel-perl
Section: perl
Priority: optional
+Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
+Build-Depends-Indep: perl, libtest-pod-coverage-perl, libtest-pod-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Jay Bonci <jaybonci at debian.org>, Damyan Ivanov <dmn at debian.org>,
- gregor herrmann <gregoa at debian.org>
-Build-Depends: debhelper (>= 7), quilt
-Build-Depends-Indep: perl, libtest-pod-perl,
- libtest-pod-coverage-perl
-Standards-Version: 3.8.0
+ gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>
+Standards-Version: 3.8.3
Homepage: http://search.cpan.org/dist/Sub-Uplevel/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsub-uplevel-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsub-uplevel-perl/
@@ -15,8 +14,8 @@
Package: libsub-uplevel-perl
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}
-Description: Sub::Uplevel - safe call stack spoofing for perl
- Sub::Uplevel from CPAN provides a safe implementation similar to Tcl's
- uplevel() function. It allows you to safely fool the caller() into
- thinking it's in a different part of the stack, without knowing that
- it is being wrapped.
+Description: module to spoof the Perl call stack
+ Sub::Uplevel is a Perl module that provides a safe implementation similar to
+ Tcl's uplevel() function. It allows you to safely fool the caller() into
+ thinking it's in a different part of the stack, without knowing that it is
+ being wrapped.
Modified: trunk/libsub-uplevel-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/debian/copyright?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/debian/copyright (original)
+++ trunk/libsub-uplevel-perl/debian/copyright Tue Nov 17 21:24:59 2009
@@ -1,32 +1,42 @@
-Format-Specification:
- http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: David A. Golden <dagolden at cpan.org>
-Upstream-Source: http://search.cpan.org/dist/Sub-Uplevel/
-Upstream-Name: Sub-Uplevel
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
+Maintainer: David A. Golden <dagolden at cpan.org>
+Source: http://search.cpan.org/dist/Sub-Uplevel/
+Name: Sub-Uplevel
Files: *
-Copyright:
- Original code Copyright (c) 2001 to 2007 by Michael G Schwern.
- Additional code Copyright (c) 2006 to 2008 by David A Golden.
-License-Alias: Perl
-License: Artistic | GPL-1+
+Copyright: 2006-2008, David A. Golden <dagolden at cpan.org>
+ 2001-2007, Michael G Schwern <mschwern at cpan.org>
+License: Artistic or GPL-1+
+
+Files: inc/Module/*
+Copyright: 2002-2009, Adam Kennedy <adamk at cpan.org>
+ 2002-2009, Audrey Tang <autrijus at autrijus.org>
+ 2002-2009, Brian Ingerson <ingy at cpan.org>
+License: Artistic or GPL-1+
Files: debian/*
-Copyright:
- 2003-2007, Jay Bonci <jay at bonci.com>
- 2007-2008, various members of the Debian Perl Group, cf. debian/changelog
-License: Artistic | GPL-1+
+Copyright:
+ 2009, Jonathan Yu <jawnsy at cpan.org>
+ 2008, gregor herrmann <gregoa at debian.org>
+ 2008, gregor herrmann <gregor+debian at comodo.priv.at>
+ 2007, Damyan Ivanov <dmn at debian.org>
+ 2003-2007, Jay Bonci <jaybonci at debian.org>
+ 2006, Gunnar Wolf <gwolf at debian.org>
+ 2003, Jay Bonci <jay at bonci.com>
+License: Artistic or GPL-1+
License: Artistic
- This program is free software; you can redistribute it and/or modify
- it under the terms of the Artistic License, which comes with Perl.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in /usr/share/common-licenses/Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
License: GPL-1+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'
Modified: trunk/libsub-uplevel-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/debian/rules?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/debian/rules (original)
+++ trunk/libsub-uplevel-perl/debian/rules Tue Nov 17 21:24:59 2009
@@ -1,28 +1,4 @@
#!/usr/bin/make -f
-include /usr/share/quilt/quilt.make
-
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
- dh build --before dh_auto_test
- # we have no Test::Spelling, and Perl::Critic tests fail so we only take the other xt/ tests
- $(MAKE) test TEST_FILES='t/*.t xt/pod*.t'
- dh build --after dh_auto_test
- touch $@
-
-clean: unpatch
- dh $@
-
-install: install-stamp
-install-stamp: build-stamp
- dh install
- touch $@
-
-binary-arch:
-
-binary-indep: install
- dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
+%:
+ dh --with quilt $@
Modified: trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pm?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pm (original)
+++ trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pm Tue Nov 17 21:24:59 2009
@@ -2,30 +2,47 @@
use 5.006;
use strict;
-our $VERSION = '0.2002';
+our $VERSION = '0.22';
$VERSION = eval $VERSION;
+
+# We must override *CORE::GLOBAL::caller if it hasn't already been
+# overridden or else Perl won't see our local override later.
+
+if ( not defined *CORE::GLOBAL::caller{CODE} ) {
+ *CORE::GLOBAL::caller = \&_normal_caller;
+}
+
+# modules to force reload if ":aggressive" is specified
+my @reload_list = qw/Exporter Exporter::Heavy/;
sub import {
no strict 'refs';
my ($class, @args) = @_;
- for my $fcn ( @args ) {
- if ( $fcn ne 'uplevel' ) {
- die qq{"$fcn" is not exported by the $class module\n}
+ for my $tag ( @args, 'uplevel' ) {
+ if ( $tag eq 'uplevel' ) {
+ my $caller = caller(0);
+ *{"$caller\::uplevel"} = \&uplevel;
+ }
+ elsif( $tag eq ':aggressive' ) {
+ _force_reload( @reload_list );
+ }
+ else {
+ die qq{"$tag" is not exported by the $class module\n}
}
}
- my $caller = caller(0);
- *{"$caller\::uplevel"} = \&uplevel;
return;
}
-# We must override *CORE::GLOBAL::caller if it hasn't already been
-# overridden or else Perl won't see our local override later.
-
-if ( not defined *CORE::GLOBAL::caller{CODE} ) {
- *CORE::GLOBAL::caller = \&_normal_caller;
-}
-
-
+sub _force_reload {
+ no warnings 'redefine';
+ local $^W = 0;
+ for my $m ( @_ ) {
+ $m =~ s{::}{/}g;
+ $m .= ".pm";
+ require $m if delete $INC{$m};
+ }
+}
+
=head1 NAME
Sub::Uplevel - apparently run a function in a higher stack frame
@@ -280,7 +297,8 @@
=head1 BUGS and CAVEATS
Well, the bad news is uplevel() is about 5 times slower than a normal
-function call. XS implementation anyone?
+function call. XS implementation anyone? It also slows down every invocation
+of caller(), regardless of whether uplevel() is in effect.
Sub::Uplevel overrides CORE::GLOBAL::caller temporarily for the scope of
each uplevel call. It does its best to work with any previously existing
@@ -290,6 +308,19 @@
However, if you are routinely using multiple modules that override
CORE::GLOBAL::caller, you are probably asking for trouble.
+You B<should> load Sub::Uplevel as early as possible within your program. As
+with all CORE::GLOBAL overloading, the overload will not affect modules that
+have already been compiled prior to the overload. One module that often is
+unavoidably loaded prior to Sub::Uplevel is Exporter. To forceably recompile
+Exporter (and Exporter::Heavy) after loading Sub::Uplevel, use it with the
+":aggressive" tag:
+
+ use Sub::Uplevel qw/:aggressive/;
+
+The private function C<Sub::Uplevel::_force_reload()> may be passed a list of
+additional modules to reload if ":aggressive" is not aggressive enough.
+Reloading modules may break things, so only use this as a last resort.
+
As of version 0.20, Sub::Uplevel requires Perl 5.6 or greater.
=head1 HISTORY
Modified: trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pod?rev=47383&op=diff
==============================================================================
--- trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pod (original)
+++ trunk/libsub-uplevel-perl/lib/Sub/Uplevel.pod Tue Nov 17 21:24:59 2009
@@ -8,7 +8,7 @@
=head1 VERSION
-This documentation describes version 0.2002
+This documentation describes version 0.22
=head1 SYNOPSIS
@@ -137,7 +137,8 @@
=head1 BUGS and CAVEATS
Well, the bad news is uplevel() is about 5 times slower than a normal
-function call. XS implementation anyone?
+function call. XS implementation anyone? It also slows down every invocation
+of caller(), regardless of whether uplevel() is in effect.
Sub::Uplevel overrides CORE::GLOBAL::caller temporarily for the scope of
each uplevel call. It does its best to work with any previously existing
@@ -146,6 +147,19 @@
However, if you are routinely using multiple modules that override
CORE::GLOBAL::caller, you are probably asking for trouble.
+
+You B<should> load Sub::Uplevel as early as possible within your program. As
+with all CORE::GLOBAL overloading, the overload will not affect modules that
+have already been compiled prior to the overload. One module that often is
+unavoidably loaded prior to Sub::Uplevel is Exporter. To forceably recompile
+Exporter (and Exporter::Heavy) after loading Sub::Uplevel, use it with the
+":aggressive" tag:
+
+ use Sub::Uplevel qw/:aggressive/;
+
+The private function C<Sub::Uplevel::_force_reload()> may be passed a list of
+additional modules to reload if ":aggressive" is not aggressive enough.
+Reloading modules may break things, so only use this as a last resort.
As of version 0.20, Sub::Uplevel requires Perl 5.6 or greater.
More information about the Pkg-perl-cvs-commits
mailing list