summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-13 15:35:15 +0100
committerJesse Vincent <jesse@bestpractical.com>2009-10-16 12:30:16 -0400
commit3963d30b5a2dc4d265ac265e8db15801366a507f (patch)
treee88119301b202b9a7ce06b12d6305064116d249a /t
parent140d27a472ded936ea3bf0616e64be64bc105edd (diff)
downloadperl-3963d30b5a2dc4d265ac265e8db15801366a507f.tar.gz
Opening dirhandle DIR also as a file needs no warnings 'deprecated';
Diffstat (limited to 't')
-rw-r--r--t/op/stat.t14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/op/stat.t b/t/op/stat.t
index 007869eb42..5167655db1 100644
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -495,8 +495,11 @@ SKIP: {
ok(-d DIR, "-d on a dirhandle works");
# And now for the ambigious bareword case
- ok(open(DIR, "TEST"), 'Can open "TEST" dir')
- || diag "Can't open 'TEST': $!";
+ {
+ no warnings 'deprecated';
+ ok(open(DIR, "TEST"), 'Can open "TEST" dir')
+ || diag "Can't open 'TEST': $!";
+ }
my $size = (stat(DIR))[7];
ok(defined $size, "stat() on bareword works");
is($size, -s "TEST", "size returned by stat of bareword is for the file");
@@ -525,8 +528,11 @@ SKIP: {
ok(-d -r *DIR{IO} , "chained -x's on *DIR{IO}");
# And now for the ambigious bareword case
- ok(open(DIR, "TEST"), 'Can open "TEST" dir')
- || diag "Can't open 'TEST': $!";
+ {
+ no warnings 'deprecated';
+ ok(open(DIR, "TEST"), 'Can open "TEST" dir')
+ || diag "Can't open 'TEST': $!";
+ }
my $size = (stat(*DIR{IO}))[7];
ok(defined $size, "stat() on *THINGY{IO} works");
is($size, -s "TEST",