From: kaminsky@math.huji.ac.il (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-31843-97358.2.
89612012687236@perl.org>
(with tweaks)
p4raw-id: //depot/perl@23361
${^WARNING_BITS} = $mask ;
}
+my %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
+
sub __chk
{
my $category ;
if (@_) {
# check the category supplied.
$category = shift ;
- if (ref $category) {
- Croaker ("not an object")
- if $category !~ /^([^=]+)=/ ;
- $category = $1 ;
+ if (my $type = ref $category) {
+ Croaker("not an object")
+ if exists $builtin_type{$type};
+ $category = $type;
$isobj = 1 ;
}
$offset = $Offsets{$category};
${^WARNING_BITS} = $mask ;
}
+my %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
+
sub __chk
{
my $category ;
if (@_) {
# check the category supplied.
$category = shift ;
- if (ref $category) {
- Croaker ("not an object")
- if $category !~ /^([^=]+)=/ ;
- $category = $1 ;
+ if (my $type = ref $category) {
+ Croaker("not an object")
+ if exists $builtin_type{$type};
+ $category = $type;
$isobj = 1 ;
}
$offset = $Offsets{$category};