Subject: | File-Util-3.27 bug |
Date: | Tue, 1 Dec 2009 05:51:33 -0800 (PST) |
To: | bug-File-Util [...] rt.cpan.org |
From: | MICHAEL MCGINN <mmcginn [...] rogers.com> |
Hi Tommy,
I'm having an issue with the error handling and how to stop
the 'list_dir' method from aborting on a directory which contains
another directory owned by another user; example: root ownership with permissions 'drwx------'.
I was expecting to be able to capture and bypass the error/warning given what's indicated in the documentation.
Regards,
Michael
---------------------------------------------------------------------------
uname -a
Linux dune 2.6.18-164.6.1.el5.centos.plus #1 SMP Wed Nov 4 09:31:39 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
perl -version
This is perl, v5.10.1 built for x86_64-linux-thread-multi
(with 2 registered patches, see perl -V for more detail)
File-Util-3.27
----- code
#!/opt/ActivePerl-5.10/bin/perl
use strict;
use warnings;
use File::Util;
my $fu = File::Util->new('--fatals-as-warning');
my @directories = $fu->list_dir('/home/mmcginn', '--files-only', '--recurse',);
---------------------------------------
Show quoted text
----- ERROR --------------
File::Util can't opendir on directory:
»/home/user/.dbus«
The system returned this error:
»Permission denied«
Origin: Could be either human _or_ system error.
Solution: Cannot diagnose. A Human must investigate the problem.
1. File::Util::list_dir
-called at line (266) of /opt/ActivePerl-5.10/site/lib/File/Util.pm
-was called with args
-was not called to evaluate anything
2. File::Util::list_dir
-called at line (10) of /home/user/Scripts/file_util.pl
-was called with args
-was not called to evaluate anything
Can't use an undefined value as an ARRAY reference at /opt/ActivePerl-5.10/site/lib/File/Util.pm line 274.
----------------------------------------------