summaryrefslogtreecommitdiff
path: root/lib/overload.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-04 21:55:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-04 21:55:03 +0000
commit6ae452c6b4a9f0f8b40735d19b10d6f5bcfb6a11 (patch)
tree8c44a139ca3d1e950415b5229fd41ee183f96f20 /lib/overload.pm
parenta88ef58f77bf61414cf7464b32ab1c9604510702 (diff)
downloadperl-6ae452c6b4a9f0f8b40735d19b10d6f5bcfb6a11.tar.gz
make hints available via globals in the respective pragmas to
avoid duplicating the constants everywhere p4raw-id: //depot/perl@5527
Diffstat (limited to 'lib/overload.pm')
-rw-r--r--lib/overload.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/overload.pm b/lib/overload.pm
index 3750a43168..ba96bc9ab6 100644
--- a/lib/overload.pm
+++ b/lib/overload.pm
@@ -1,5 +1,7 @@
package overload;
+$overload::hint_bits = 0x20000;
+
sub nil {}
sub OVERLOAD {
@@ -129,7 +131,7 @@ sub constant {
# Arguments: what, sub
while (@_) {
$^H{$_[0]} = $_[1];
- $^H |= $constants{$_[0]} | 0x20000;
+ $^H |= $constants{$_[0]} | $overload::hint_bits;
shift, shift;
}
}