change #18038 gives too many problems on t/450_service.t; disable
[p5sagit/p5-mst-13.2.git] / lib / filetest.pm
index d08f9b4..7eb58a6 100644 (file)
@@ -1,5 +1,7 @@
 package filetest;
 
+our $VERSION = '1.00';
+
 =head1 NAME
 
 filetest - Perl pragma to control the filetest permission operators
@@ -36,7 +38,8 @@ B<NOTE>: using the file tests for security purposes is a lost cause
 from the start: there is a window open for race conditions (who is to
 say that the permissions will not change between the test and the real
 operation?).  Therefore if you are serious about security, just try
-the real operation and test for its success.  Think atomicity.
+the real operation and test for its success - think in terms of atomic
+operations.
 
 =head2 subpragma access
 
@@ -47,9 +50,11 @@ operators is a filename, not when it is a filehandle.
 
 =cut
 
+$filetest::hint_bits = 0x00400000;
+
 sub import {
     if ( $_[1] eq 'access' ) {
-       $^H |= 0x00400000;
+       $^H |= $filetest::hint_bits;
     } else {
        die "filetest: the only implemented subpragma is 'access'.\n";
     }
@@ -57,7 +62,7 @@ sub import {
 
 sub unimport {
     if ( $_[1] eq 'access' ) {
-       $^H &= ~0x00400000;
+       $^H &= ~$filetest::hint_bits;
     } else {
        die "filetest: the only implemented subpragma is 'access'.\n";
     }