This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with the "-r" test in Perl 5.8.6-4


On Fri, 11 Mar 2005, Yitzchak Scott-Thoennes wrote:

> On Thu, Mar 10, 2005 at 08:44:40PM -0500, Igor Pechtchanski wrote:
> > Hi,
> >
> > I'm having trouble with Perl 5.8.6-4 under Cygwin 1.5.12.
> >
> > $ perl -e 'exit !(-r $ARGV[0])' /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep"
> > $ test -r /cygdrive/c/Program\ Files/ThinkPad/Utilities && echo "yep"
> > yep
> >
> > Is this behavior by design, or does perl actually check ACLs and something
> > is wrong with my installation?
> > 	Igor
>
> perldoc -f -r:
>
>               The interpretation of the file permission operators "-r", "-R",
>               "-w", "-W", "-x", and "-X" is by default based solely on the
>               mode of the file and the uids and gids of the user.  There may
>               be other reasons you can't actually read, write, or execute the
>               file.  Such reasons may be for example network filesystem
>               access controls, ACLs (access control lists), read-only
>               filesystems, and unrecognized executable formats.
>
> You can try the filetest pragma: use filetest 'access';
> see perldoc filetest.

I see.  So basically this isn't likely to change in Perl, and so is a bug
in the program that uses -r here.  I'll report this as a bug, then.
Thanks,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]