From 3963d30b5a2dc4d265ac265e8db15801366a507f Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 13 Oct 2009 15:35:15 +0100 Subject: Opening dirhandle DIR also as a file needs no warnings 'deprecated'; --- t/op/stat.t | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 't') 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", -- cgit v1.2.1