r28452 - in /trunk/libhook-lexwrap-perl: Changes MANIFEST META.yml debian/changelog is_prerequisite lib/Hook/LexWrap.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sun Dec 21 21:58:16 UTC 2008
Author: gregoa
Date: Sun Dec 21 21:58:13 2008
New Revision: 28452
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28452
Log:
New upstream release.
Added:
trunk/libhook-lexwrap-perl/is_prerequisite
- copied unchanged from r28451, branches/upstream/libhook-lexwrap-perl/current/is_prerequisite
Modified:
trunk/libhook-lexwrap-perl/Changes
trunk/libhook-lexwrap-perl/MANIFEST
trunk/libhook-lexwrap-perl/META.yml
trunk/libhook-lexwrap-perl/debian/changelog
trunk/libhook-lexwrap-perl/lib/Hook/LexWrap.pm
Modified: trunk/libhook-lexwrap-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhook-lexwrap-perl/Changes?rev=28452&op=diff
==============================================================================
--- trunk/libhook-lexwrap-perl/Changes (original)
+++ trunk/libhook-lexwrap-perl/Changes Sun Dec 21 21:58:13 2008
@@ -30,6 +30,7 @@
- Fixed C<caller> (thanks everyone)
+
0.21 Nov 6 2008
- Added 'See also: Sub::Prepend'
@@ -41,3 +42,12 @@
- Moved tests to t/. Silenced warnings.
- Added pod.t
+
+
+0.22 Dec 18 2008
+
+ - use strict; use warnings;
+
+ - Added prototype for caller
+
+ - silenced warnings about sub replacements
Modified: trunk/libhook-lexwrap-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhook-lexwrap-perl/MANIFEST?rev=28452&op=diff
==============================================================================
--- trunk/libhook-lexwrap-perl/MANIFEST (original)
+++ trunk/libhook-lexwrap-perl/MANIFEST Sun Dec 21 21:58:13 2008
@@ -7,4 +7,5 @@
t/pod.t
demo/demo_memo.pl
demo/demo_temp.pl
+is_prerequisite
META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libhook-lexwrap-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhook-lexwrap-perl/META.yml?rev=28452&op=diff
==============================================================================
--- trunk/libhook-lexwrap-perl/META.yml (original)
+++ trunk/libhook-lexwrap-perl/META.yml Sun Dec 21 21:58:13 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Hook-LexWrap
-version: 0.21
+version: 0.22
abstract: Lexically scoped subroutine wrappers
author:
- Damian Conway (damian at conway.org)
Modified: trunk/libhook-lexwrap-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhook-lexwrap-perl/debian/changelog?rev=28452&op=diff
==============================================================================
--- trunk/libhook-lexwrap-perl/debian/changelog (original)
+++ trunk/libhook-lexwrap-perl/debian/changelog Sun Dec 21 21:58:13 2008
@@ -1,3 +1,9 @@
+libhook-lexwrap-perl (0.22-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org> Sun, 21 Dec 2008 22:57:08 +0100
+
libhook-lexwrap-perl (0.21-1) unstable; urgency=low
[ gregor herrmann ]
Modified: trunk/libhook-lexwrap-perl/lib/Hook/LexWrap.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhook-lexwrap-perl/lib/Hook/LexWrap.pm?rev=28452&op=diff
==============================================================================
--- trunk/libhook-lexwrap-perl/lib/Hook/LexWrap.pm (original)
+++ trunk/libhook-lexwrap-perl/lib/Hook/LexWrap.pm Sun Dec 21 21:58:13 2008
@@ -1,9 +1,13 @@
package Hook::LexWrap;
use 5.006;
-our $VERSION = '0.21';
+use strict;
+use warnings;
+our $VERSION = '0.22';
use Carp;
-*CORE::GLOBAL::caller = sub {
+{
+no warnings 'redefine';
+*CORE::GLOBAL::caller = sub (;$) {
my ($height) = ($_[0]||0);
my $i=1;
my $name_cache;
@@ -15,17 +19,22 @@
return wantarray ? @_ ? @caller : @caller[0..2] : $caller[0];
}
};
-
-sub import { *{caller()."::wrap"} = \&wrap }
-
-sub wrap (*@) {
+}
+
+sub import { no strict 'refs'; *{caller()."::wrap"} = \&wrap }
+
+sub wrap (*@) { ## no critic Prototypes
my ($typeglob, %wrapper) = @_;
$typeglob = (ref $typeglob || $typeglob =~ /::/)
? $typeglob
: caller()."::$typeglob";
- my $original = ref $typeglob eq 'CODE' && $typeglob
+ my $original;
+ {
+ no strict 'refs';
+ $original = ref $typeglob eq 'CODE' && $typeglob
|| *$typeglob{CODE}
|| croak "Can't wrap non-existent subroutine ", $typeglob;
+ }
croak "'$_' value is not a subroutine reference"
foreach grep {$wrapper{$_} && ref $wrapper{$_} ne 'CODE'}
qw(pre post);
@@ -68,7 +77,10 @@
ref $typeglob eq 'CODE' and return defined wantarray
? $imposter
: carp "Uselessly wrapped subroutine reference in void context";
- *{$typeglob} = $imposter;
+ {
+ no strict 'refs';
+ *{$typeglob} = $imposter;
+ }
return unless defined wantarray;
return bless sub{ $unwrap=1 }, 'Hook::LexWrap::Cleanup';
}
More information about the Pkg-perl-cvs-commits
mailing list