package filetest;
+our $VERSION = '1.00';
+
=head1 NAME
filetest - Perl pragma to control the filetest permission operators
=head1 SYNOPSIS
-
+
$can_perhaps_read = -r "file"; # use the mode bits
{
use filetest 'access'; # intuit harder
=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";
}
sub unimport {
if ( $_[1] eq 'access' ) {
- $^H &= ~0x00400000;
+ $^H &= ~$filetest::hint_bits;
} else {
die "filetest: the only implemented subpragma is 'access'.\n";
}