r77266 - in /branches/upstream/libdevel-declare-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Devel/ lib/Devel/Declare/Context/ lib/Devel/Declare/MethodInstaller/ t/
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Fri Jul 8 21:45:58 UTC 2011
Author: ansgar
Date: Fri Jul 8 21:45:55 2011
New Revision: 77266
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77266
Log:
[svn-upgrade] new version libdevel-declare-perl (0.006005)
Added:
branches/upstream/libdevel-declare-perl/current/t/method-installer-redefine.t
Modified:
branches/upstream/libdevel-declare-perl/current/Changes
branches/upstream/libdevel-declare-perl/current/MANIFEST
branches/upstream/libdevel-declare-perl/current/META.yml
branches/upstream/libdevel-declare-perl/current/Makefile.PL
branches/upstream/libdevel-declare-perl/current/inc/Module/Install.pm
branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Base.pm
branches/upstream/libdevel-declare-perl/current/inc/Module/Install/MakeMaker.pm
branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm
branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/Context/Simple.pm
branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/MethodInstaller/Simple.pm
Modified: branches/upstream/libdevel-declare-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/Changes?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/Changes (original)
+++ branches/upstream/libdevel-declare-perl/current/Changes Fri Jul 8 21:45:55 2011
@@ -1,4 +1,8 @@
Changes for Devel-Declare
+
+0.006005 - 06 Jul 2011
+ - Add a flag for controlling 'redefined' warnings when installing subs into
+ namespaces (clkao).
0.006004 - 02 May 2011
- Bail out earlier when being called while not lexing (Zefram).
Modified: branches/upstream/libdevel-declare-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/MANIFEST?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/MANIFEST (original)
+++ branches/upstream/libdevel-declare-perl/current/MANIFEST Fri Jul 8 21:45:55 2011
@@ -29,6 +29,7 @@
t/lines.t
t/load_module.t
t/methinstaller-simple.t
+t/method-installer-redefine.t
t/method-installer-runtime.t
t/method-no-semi.t
t/method.t
Modified: branches/upstream/libdevel-declare-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/META.yml?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/META.yml (original)
+++ branches/upstream/libdevel-declare-perl/current/META.yml Fri Jul 8 21:45:55 2011
@@ -6,12 +6,13 @@
B::Hooks::OP::Check: 0.18
ExtUtils::MakeMaker: 6.42
Test::More: 0.88
+ Test::Warn: 0
configure_requires:
B::Hooks::OP::Check: 0.18
ExtUtils::Depends: 0.302
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 1.00'
+generated_by: 'Module::Install version 1.01'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,4 +31,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/rafl/devel-declare.git
-version: 0.006004
+version: 0.006005
Modified: branches/upstream/libdevel-declare-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/Makefile.PL?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/Makefile.PL (original)
+++ branches/upstream/libdevel-declare-perl/current/Makefile.PL Fri Jul 8 21:45:55 2011
@@ -21,6 +21,7 @@
configure_requires 'B::Hooks::OP::Check' => '0.18';
test_requires 'Test::More' => '0.88';
+test_requires 'Test::Warn';
repository 'git://github.com/rafl/devel-declare.git';
Modified: branches/upstream/libdevel-declare-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/inc/Module/Install.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/inc/Module/Install.pm Fri Jul 8 21:45:55 2011
@@ -31,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.00';
+ $VERSION = '1.01';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -467,4 +467,4 @@
1;
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.
Modified: branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Base.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Base.pm Fri Jul 8 21:45:55 2011
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
Modified: branches/upstream/libdevel-declare-perl/current/inc/Module/Install/MakeMaker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/inc/Module/Install/MakeMaker.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/inc/Module/Install/MakeMaker.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/inc/Module/Install/MakeMaker.pm Fri Jul 8 21:45:55 2011
@@ -7,7 +7,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Makefile.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Makefile.pm Fri Jul 8 21:45:55 2011
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Metadata.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/inc/Module/Install/Metadata.pm Fri Jul 8 21:45:55 2011
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -515,6 +515,7 @@
'GNU Free Documentation license' => 'unrestricted', 1,
'GNU Affero General Public License' => 'open_source', 1,
'(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
'Artistic license' => 'artistic', 1,
'Apache (?:Software )?license' => 'apache', 1,
'GPL' => 'gpl', 1,
@@ -550,9 +551,9 @@
sub _extract_bugtracker {
my @links = $_[0] =~ m#L<(
- \Qhttp://rt.cpan.org/\E[^>]+|
- \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
- \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
)>#gx;
my %links;
@links{@links}=();
Modified: branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm Fri Jul 8 21:45:55 2011
@@ -4,7 +4,7 @@
use warnings;
use 5.008001;
-our $VERSION = '0.006004';
+our $VERSION = '0.006005';
use constant DECLARE_NAME => 1;
use constant DECLARE_PROTO => 2;
Modified: branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/Context/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/Context/Simple.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/Context/Simple.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/Context/Simple.pm Fri Jul 8 21:45:55 2011
@@ -13,7 +13,7 @@
sub init {
my $self = shift;
- @{$self}{ qw(Declarator Offset) } = @_;
+ @{$self}{ qw(Declarator Offset WarningOnRedefined) } = @_;
return $self;
}
@@ -30,6 +30,11 @@
sub declarator {
my $self = shift;
return $self->{Declarator}
+}
+
+sub warning_on_redefine {
+ my $self = shift;
+ return $self->{WarningOnRedefined}
}
sub skip_declarator {
Modified: branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/MethodInstaller/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/MethodInstaller/Simple.pm?rev=77266&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/MethodInstaller/Simple.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare/MethodInstaller/Simple.pm Fri Jul 8 21:45:55 2011
@@ -7,7 +7,7 @@
use strict;
use warnings;
-our $VERSION = '0.006004';
+our $VERSION = '0.006005';
sub install_methodhandler {
my $class = shift;
@@ -17,10 +17,11 @@
*{$args{into}.'::'.$args{name}} = sub (&) {};
}
+ my $warnings = warnings::enabled("redefine");
my $ctx = $class->new(%args);
Devel::Declare->setup_for(
$args{into},
- { $args{name} => { const => sub { $ctx->parser(@_) } } }
+ { $args{name} => { const => sub { $ctx->parser(@_, $warnings) } } }
);
}
@@ -35,7 +36,11 @@
my $code = shift;
# So caller() gets the subroutine name
no strict 'refs';
- *{$name} = subname $name => $code;
+ my $installer = $self->warning_on_redefine
+ ? sub { *{$name} = subname $name => $code; }
+ : sub { no warnings 'redefine';
+ *{$name} = subname $name => $code; };
+ $installer->();
return;
};
} else {
Added: branches/upstream/libdevel-declare-perl/current/t/method-installer-redefine.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/t/method-installer-redefine.t?rev=77266&op=file
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/t/method-installer-redefine.t (added)
+++ branches/upstream/libdevel-declare-perl/current/t/method-installer-redefine.t Fri Jul 8 21:45:55 2011
@@ -1,0 +1,42 @@
+use strict;
+use warnings;
+use Test::More tests => 4;
+use Test::Warn;
+use Devel::Declare::MethodInstaller::Simple;
+
+BEGIN {
+ Devel::Declare::MethodInstaller::Simple->install_methodhandler(
+ name => 'method',
+ into => 'main',
+ );
+}
+
+BEGIN {
+ no warnings 'redefine';
+ Devel::Declare::MethodInstaller::Simple->install_methodhandler(
+ name => 'method_quiet',
+ into => 'main',
+ );
+}
+
+ok(!main->can('foo'), 'foo() not installed yet');
+
+method foo {
+ $_[0]->method
+}
+
+use Test::Warn;
+
+ok(main->can('foo'), 'foo() installed at runtime');
+
+warnings_like {
+ method foo {
+ $_[0]->method;
+ }
+} qr/redefined/;
+
+warnings_are {
+ method_quiet foo {
+ $_[0]->method;
+ }
+} [], 'no warnings';
More information about the Pkg-perl-cvs-commits
mailing list