<patch> avoid division by 0 in Benchmark.pm
[p5sagit/p5-mst-13.2.git] / lib / caller.pm
index 7029212..98d4f3f 100644 (file)
@@ -1,6 +1,5 @@
 package caller;
-use vars qw($VERSION);
-$VERSION = "1.0";
+our $VERSION = "1.0";
 
 =head1 NAME
 
@@ -33,7 +32,7 @@ setting in the calling context.
 
 =cut
 
-my %bits = (
+my %bitmask = (
     # only HINT_UTF8 supported for now
     encoding => 0x8
 );
@@ -48,9 +47,7 @@ sub import {
     shift;
     my @cxt = caller(3);
     if (@cxt and $cxt[7]) {    # was our parent require-d?
-       #warn "hints was $^H\n";
-       $^H |= bits(@_) | $cxt[8];
-       #warn "hints now $^H\n";
+       $^H |= bits(@_) & $cxt[8];
     }
 }