r28562 - in /trunk/libclass-c3-adopt-next-perl: Changes MANIFEST META.yml README debian/changelog inc/Module/Install/ExtraTests.pm lib/Class/C3/Adopt/NEXT.pm t/import.t
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Tue Dec 23 11:45:21 UTC 2008
Author: eloy
Date: Tue Dec 23 11:45:18 2008
New Revision: 28562
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28562
Log:
new upstream version
Added:
trunk/libclass-c3-adopt-next-perl/t/import.t
- copied unchanged from r28561, branches/upstream/libclass-c3-adopt-next-perl/current/t/import.t
Modified:
trunk/libclass-c3-adopt-next-perl/Changes
trunk/libclass-c3-adopt-next-perl/MANIFEST
trunk/libclass-c3-adopt-next-perl/META.yml
trunk/libclass-c3-adopt-next-perl/README
trunk/libclass-c3-adopt-next-perl/debian/changelog
trunk/libclass-c3-adopt-next-perl/inc/Module/Install/ExtraTests.pm
trunk/libclass-c3-adopt-next-perl/lib/Class/C3/Adopt/NEXT.pm
Modified: trunk/libclass-c3-adopt-next-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/Changes?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/Changes (original)
+++ trunk/libclass-c3-adopt-next-perl/Changes Tue Dec 23 11:45:18 2008
@@ -1,3 +1,10 @@
+0.05 Sat, 20 Dec 2008 16:04:48 +0100
+ * Upgrade Module::Install::ExtraTests to 0.006. This makes things work on
+ Win32 again (closes RT#41817).
+ * Update warning to be more eloquent.
+ * Document warnings.
+ * Implement a -no_warn import switch to turn of warnings locally.
+
0.04 Sun, 07 Dec 2008 01:11:59 +0100
* Install our hacked version of NEXT::AUTOLOAD into NEXT::ACTUAL::AUTOLOAD
too. This makes us work with NEXT 0.61, which doesn't do all of its magic
Modified: trunk/libclass-c3-adopt-next-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/MANIFEST?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/MANIFEST (original)
+++ trunk/libclass-c3-adopt-next-perl/MANIFEST Tue Dec 23 11:45:18 2008
@@ -15,6 +15,7 @@
README
t/basic.t
t/disable.t
+t/import.t
t/incompatible.t
t/lib/C3NT.pm
t/lib/C3NT_nowarn.pm
Modified: trunk/libclass-c3-adopt-next-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/META.yml?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/META.yml (original)
+++ trunk/libclass-c3-adopt-next-perl/META.yml Tue Dec 23 11:45:18 2008
@@ -20,4 +20,4 @@
NEXT: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.04
+version: 0.05
Modified: trunk/libclass-c3-adopt-next-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/README?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/README (original)
+++ trunk/libclass-c3-adopt-next-perl/README Tue Dec 23 11:45:18 2008
@@ -5,12 +5,15 @@
package MyApp::Plugin::FooBar;
#use NEXT;
use Class::C3::Adopt::NEXT;
+ # or 'use Class::C3::Adopt::NEXT' -no_warn to suppress warning
sub a_method {
my ($self) = @_;
# Do some stuff
# Re-dispatch method
+ # Note that this will generate a warning the _first_ time the package
+ # uses NEXT unless you un comment the 'no warnings' line above.
$self->NEXT::method();
}
@@ -30,6 +33,11 @@
then write new code without "NEXT", and migrate individual source files
to use "Class::C3" or method modifiers as appropriate, at whatever pace
you're comfortable with.
+
+WARNINGS
+ This module will warn once for each package using NEXT. It uses
+ warnings::register, and so can be disabled like by adding "no warnings
+ 'Class::C3::Adopt::NEXT';" to each package which generates a warning.
MIGRATING
There are two main reasons for using NEXT:
Modified: trunk/libclass-c3-adopt-next-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/debian/changelog?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/debian/changelog (original)
+++ trunk/libclass-c3-adopt-next-perl/debian/changelog Tue Dec 23 11:45:18 2008
@@ -1,3 +1,16 @@
+libclass-c3-adopt-next-perl (0.05-1) UNRELEASED; urgency=low
+
+ * (NOT RELEASED YET) New upstream release
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 23 Dec 2008 12:43:50 +0100
+
+libclass-c3-adopt-next-perl (0.04-1.1) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * NOT RELEASED YET
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Wed, 17 Dec 2008 15:40:03 +0100
+
libclass-c3-adopt-next-perl (0.04-1) unstable; urgency=low
* Initial Release (closes: #509017).
Modified: trunk/libclass-c3-adopt-next-perl/inc/Module/Install/ExtraTests.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/inc/Module/Install/ExtraTests.pm?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/inc/Module/Install/ExtraTests.pm (original)
+++ trunk/libclass-c3-adopt-next-perl/inc/Module/Install/ExtraTests.pm Tue Dec 23 11:45:18 2008
@@ -6,7 +6,7 @@
use Module::Install::Base;
BEGIN {
- our $VERSION = '0.004';
+ our $VERSION = '0.006';
our $ISCORE = 1;
our @ISA = qw{Module::Install::Base};
}
@@ -35,7 +35,7 @@
my $is_author = $Module::Install::AUTHOR ? 1 : 0;
return qq{\t$perl "-Iinc" "-MModule::Install::ExtraTests" }
- . qq["-e" "Module::Install::ExtraTests::__harness('Test::Harness', (exists \\\$\$ENV{AUTHOR_TESTING} ? \\\$\$ENV{AUTHOR_TESTING} : $is_author), '$a_str', '$r_str', '$s_str', \$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n];
+ . qq{"-e" "Module::Install::ExtraTests::__harness('Test::Harness', $is_author, '$a_str', '$r_str', '$s_str', \$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
}
sub dist_test {
@@ -66,7 +66,7 @@
# out on the command line can blow over its exec limit.
require ExtUtils::Command;
push @ARGV, __PACKAGE__->_deep_t($author_tests)
- if $author_tests and $is_author;
+ if $author_tests and (exists $ENV{AUTHOR_TESTING} ? $ENV{AUTHOR_TESTING} : $is_author);
push @ARGV, __PACKAGE__->_deep_t($release_tests)
if $release_tests and $ENV{RELEASE_TESTING};
Modified: trunk/libclass-c3-adopt-next-perl/lib/Class/C3/Adopt/NEXT.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-adopt-next-perl/lib/Class/C3/Adopt/NEXT.pm?rev=28562&op=diff
==============================================================================
--- trunk/libclass-c3-adopt-next-perl/lib/Class/C3/Adopt/NEXT.pm (original)
+++ trunk/libclass-c3-adopt-next-perl/lib/Class/C3/Adopt/NEXT.pm Tue Dec 23 11:45:18 2008
@@ -7,7 +7,7 @@
use MRO::Compat;
use warnings::register;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
{
my %c3_mro_ok;
@@ -38,7 +38,8 @@
if (length $c3_mro_ok{$class} && $c3_mro_ok{$class}) {
unless ($warned_for{$class}) {
- warnings::warnif("${class} is trying to use NEXT, which is crap. use Class::C3 or Moose method modifiers instead.");
+ warnings::warnif("${class} is trying to use NEXT, which is deprecated. "
+ . "Please see the Class::C3::Adopt::NEXT documentation for details");
$warned_for{$class} = 1;
}
}
@@ -55,6 +56,16 @@
*NEXT::ACTUAL::AUTOLOAD = \&NEXT::AUTOLOAD;
}
+ sub import {
+ my ($class, @args) = @_;
+ my $target = caller();
+
+ for my $arg (@args) {
+ $warned_for{$target} = 1
+ if $arg eq '-no_warn';
+ }
+ }
+
sub unimport {
my $class = shift;
@c3_mro_ok{@_} = ('') x @_;
@@ -74,12 +85,15 @@
package MyApp::Plugin::FooBar;
#use NEXT;
use Class::C3::Adopt::NEXT;
+ # or 'use Class::C3::Adopt::NEXT' -no_warn to suppress warning
sub a_method {
my ($self) = @_;
# Do some stuff
# Re-dispatch method
+ # Note that this will generate a warning the _first_ time the package
+ # uses NEXT unless you un comment the 'no warnings' line above.
$self->NEXT::method();
}
@@ -98,6 +112,13 @@
interface, but using L<Class::C3> to do the hard work. You can then write new
code without C<NEXT>, and migrate individual source files to use C<Class::C3> or
method modifiers as appropriate, at whatever pace you're comfortable with.
+
+=head1 WARNINGS
+
+This module will warn once for each package using NEXT. It uses
+L<warnings::register>, and so can be disabled like by adding
+C<no warnings 'Class::C3::Adopt::NEXT';> to each package which generates a
+warning.
=head1 MIGRATING
More information about the Pkg-perl-cvs-commits
mailing list