diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-13 15:35:15 +0100 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2009-10-16 12:30:16 -0400 |
commit | 3963d30b5a2dc4d265ac265e8db15801366a507f (patch) | |
tree | e88119301b202b9a7ce06b12d6305064116d249a /t | |
parent | 140d27a472ded936ea3bf0616e64be64bc105edd (diff) | |
download | perl-3963d30b5a2dc4d265ac265e8db15801366a507f.tar.gz |
Opening dirhandle DIR also as a file needs no warnings 'deprecated';
Diffstat (limited to 't')
-rw-r--r-- | t/op/stat.t | 14 |
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", |