diff options
author | Tony Cook <tony@develop-help.com> | 2012-03-12 20:08:01 +1100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-21 17:51:52 -0700 |
commit | 330e7bfad0c2dfc9f57c79ac8094748ed734fd7e (patch) | |
tree | 8a9fd5a49f872209ab302b9b5a69ea3ad97f3a3a /lib | |
parent | 606cb3b3e186516d9d621a26778dd24bdd30ed0a (diff) | |
download | perl-330e7bfad0c2dfc9f57c79ac8094748ed734fd7e.tar.gz |
[rt #111640] warn on the right -X operators used on a File::stat object
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/stat.pm | 4 | ||||
-rw-r--r-- | lib/File/stat.t | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/File/stat.pm b/lib/File/stat.pm index 69cc44af1d..34c883ba5e 100644 --- a/lib/File/stat.pm +++ b/lib/File/stat.pm @@ -10,7 +10,7 @@ BEGIN { *warnif = \&warnings::warnif } our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); -our $VERSION = '1.05'; +our $VERSION = '1.06'; my @fields; BEGIN { @@ -148,7 +148,7 @@ use overload -X => sub { my ($s, $op) = @_; - if (index "rwxRWX", $op) { + if (index("rwxRWX", $op) >= 0) { (caller 0)[8] & HINT_FILETEST_ACCESS and warnif("File::stat ignores use filetest 'access'"); diff --git a/lib/File/stat.t b/lib/File/stat.t index 74bf5fb6b8..32a7481535 100644 --- a/lib/File/stat.t +++ b/lib/File/stat.t @@ -142,7 +142,6 @@ SKIP: { use filetest "access"; use warnings; for my $op (split //, "rwxRXW") { - local $TODO = $op eq "r" ? "RT 111640" : ""; # these should all warn with filetest access my $w; local $SIG{__WARN__} = sub { $w = shift }; @@ -152,7 +151,6 @@ SKIP: { } { - local $TODO = "RT 111640"; # -d and others shouldn't warn my $w; local $SIG{__WARN__} = sub { $w = shift }; |