diff options
author | Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> | 2004-11-10 18:30:38 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-11-12 21:11:48 +0000 |
commit | 5b673cda9907afd397f1e4108acdb4210b61c4ca (patch) | |
tree | 19c22d8b69b7d1c6b1b836b94f053261822bdafc /lib/constant.t | |
parent | fa11829f4b6d56533794dd127f3d1068d9593670 (diff) | |
download | perl-5b673cda9907afd397f1e4108acdb4210b61c4ca.tar.gz |
[perl #32400] Unnecessary warning from constant.pm
From: Anno Siegel (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-32400-100099.4.31094423840584@perl.org>
p4raw-id: //depot/perl@23497
Diffstat (limited to 'lib/constant.t')
-rw-r--r-- | lib/constant.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/constant.t b/lib/constant.t index 51902eb4ce..826a8de495 100644 --- a/lib/constant.t +++ b/lib/constant.t @@ -14,7 +14,7 @@ END { print STDERR @warnings } use strict; -use Test::More tests => 74; +use Test::More tests => 75; my $TB = Test::More->builder; BEGIN { use_ok('constant'); } @@ -245,3 +245,12 @@ is @{+FAMILY}, @{RFAM->[0]}; is FAMILY->[2], RFAM->[0]->[2]; is AGES->{FAMILY->[1]}, 28; is THREE**3, SPIT->(@{+FAMILY}**3); + +# Allow name of digits/underscores only if it begins with underscore +{ + use warnings FATAL => 'constant'; + eval q{ + use constant _1_2_3 => 'allowed'; + }; + ok( $@ eq '' ); +} |