From: Sébastien Aperghis-Tramoni Date: Wed, 29 Oct 2008 22:58:52 +0000 (+0100) Subject: Fwd: CPAN Upload: S/SA/SAPER/constant-1.17.tar.gz X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d96966511646abf40b43dfe2e162733bd97824fc;p=p5sagit%2Fp5-mst-13.2.git Fwd: CPAN Upload: S/SA/SAPER/constant-1.17.tar.gz Message-Id: <93213472-1B76-43A2-AACB-2BBFF901C5A7@free.fr> Date: Wed, 29 Oct 2008 22:58:52 +0100 p4raw-id: //depot/perl@34648 --- diff --git a/lib/constant.pm b/lib/constant.pm index 53d99d5..906b777 100644 --- a/lib/constant.pm +++ b/lib/constant.pm @@ -4,7 +4,7 @@ use strict; use warnings::register; use vars qw($VERSION %declared); -$VERSION = '1.16'; +$VERSION = '1.17'; #======================================================================= diff --git a/lib/constant.t b/lib/constant.t index 3f146c6..10560c9 100644 --- a/lib/constant.t +++ b/lib/constant.t @@ -12,11 +12,11 @@ use vars qw{ @warnings $fagwoosh $putt $kloong}; BEGIN { # ...and save 'em for later $SIG{'__WARN__'} = sub { push @warnings, @_ } } -END { print STDERR @warnings } +END { @warnings && print STDERR join "\n- ", "accumulated warnings:", @warnings } use strict; -use Test::More tests => 97; +use Test::More tests => 95; my $TB = Test::More->builder; BEGIN { use_ok('constant'); } @@ -80,13 +80,6 @@ use constant MESS => q('"'\\"'"\\); is MESS, q('"'\\"'"\\); is length(MESS), 8; -use constant TRAILING => '12 cats'; -{ - local $^W; - cmp_ok TRAILING, '==', 12; -} -is TRAILING, '12 cats'; - use constant LEADING => " \t1234"; cmp_ok LEADING, '==', 1234; is LEADING, " \t1234"; @@ -112,7 +105,7 @@ cmp_ok E2BIG, '==', 7; # text may vary, so we can't test much better than this. cmp_ok length(E2BIG), '>', 6; -is @warnings, 0 or diag join "\n", "unexpected warning", @warnings; +is @warnings, 0 or diag join "\n- ", "unexpected warning:", @warnings; @warnings = (); # just in case undef &PI; ok @warnings && ($warnings[0] =~ /Constant sub.* undefined/) or @@ -122,9 +115,9 @@ shift @warnings; is @warnings, 0, "unexpected warning"; my $curr_test = $TB->current_test; -use constant CSCALAR => \"ok 37\n"; -use constant CHASH => { foo => "ok 38\n" }; -use constant CARRAY => [ undef, "ok 39\n" ]; +use constant CSCALAR => \"ok 35\n"; +use constant CHASH => { foo => "ok 36\n" }; +use constant CARRAY => [ undef, "ok 37\n" ]; use constant CCODE => sub { "ok $_[0]\n" }; my $output = $TB->output ;