summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoshua ben Jore <jjore@cpan.org>2007-03-12 17:35:11 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-13 11:13:20 +0000
commit6a761ace523853a0b9c4ae72bd90fb320bdd7c0d (patch)
tree9b31494f1534b527c5e04d4459670c8e56786355 /lib
parent5e17dd7d8c20ce9a3e0a4717b6163a71908e6143 (diff)
downloadperl-6a761ace523853a0b9c4ae72bd90fb320bdd7c0d.tar.gz
inform constant.pm about UNITCHECK
From: "Joshua ben Jore" <twists@gmail.com> Message-ID: <dc5c751d0703130035o1a739f45g1ea559d110bd5dd8@mail.gmail.com> p4raw-id: //depot/perl@30561
Diffstat (limited to 'lib')
-rw-r--r--lib/constant.pm4
-rw-r--r--lib/constant.t6
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/constant.pm b/lib/constant.pm
index 318a5636e6..83714a89a4 100644
--- a/lib/constant.pm
+++ b/lib/constant.pm
@@ -5,12 +5,12 @@ use 5.006_00;
use warnings::register;
our($VERSION, %declared);
-$VERSION = '1.08';
+$VERSION = '1.09';
#=======================================================================
# Some names are evil choices.
-my %keywords = map +($_, 1), qw{ BEGIN INIT CHECK END DESTROY AUTOLOAD };
+my %keywords = map +($_, 1), qw{ BEGIN INIT CHECK UNITCHECK END DESTROY AUTOLOAD };
my %forced_into_main = map +($_, 1),
qw{ STDIN STDOUT STDERR ARGV ARGVOUT ENV INC SIG };
diff --git a/lib/constant.t b/lib/constant.t
index f714d23bcc..b97c688e5b 100644
--- a/lib/constant.t
+++ b/lib/constant.t
@@ -14,7 +14,7 @@ END { print STDERR @warnings }
use strict;
-use Test::More tests => 95;
+use Test::More tests => 96;
my $TB = Test::More->builder;
BEGIN { use_ok('constant'); }
@@ -182,6 +182,7 @@ eval q{
use constant 'BEGIN' => 1 ;
use constant 'INIT' => 1 ;
use constant 'CHECK' => 1 ;
+ use constant 'UNITCHECK' => 1;
use constant 'END' => 1 ;
use constant 'DESTROY' => 1 ;
use constant 'AUTOLOAD' => 1 ;
@@ -195,13 +196,14 @@ eval q{
use constant 'SIG' => 1 ;
};
-is @warnings, 15 ;
+is @warnings, 16 ;
my @Expected_Warnings =
(
qr/^Constant name 'BEGIN' is a Perl keyword at/,
qr/^Constant subroutine BEGIN redefined at/,
qr/^Constant name 'INIT' is a Perl keyword at/,
qr/^Constant name 'CHECK' is a Perl keyword at/,
+ qr/^Constant name 'UNITCHECK' is a Perl keyword at/,
qr/^Constant name 'END' is a Perl keyword at/,
qr/^Constant name 'DESTROY' is a Perl keyword at/,
qr/^Constant name 'AUTOLOAD' is a Perl keyword at/,