[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#483442: RFH: cvsweb - test -x fails with Perl 5.10



Am Freitag, den 30.05.2008, 19:59 +0200 schrieb Daniel Leidert:

> > sub search_path($)
> > {
> >   my ($command) = @_;
> >   print STDERR "DEBUG search_path(): command=$command\n";
> >   print STDERR "DEBUG search_path(): euid=$>, egid=$(, ruid=$<, rgid=$)\n";
> >   for my $d (@command_path) {
> >     print STDERR "DEBUG search_path(): command=$command, d=$d\n";
> >     my $cmd = catfile($d, $command);
> >     print STDERR "DEBUG search_path(): cmd=$cmd\n";
> >     return $cmd if (-x $cmd && !-d _);
> >   }
> >   print STDERR "DEBUG search_path(): not successful for command=$command\n";
> >   return '';
> > }
> 
> Changing the -x to be -X works.

I now found, that using

if (!-d $cmd && -x _)

works. But

if ((!-d $cmd) && (-x $cmd))
if ((-x $cmd) && (!-d _))

do not work, whereas

if ((!-d $cmd) && (-x _))

again does work. Am I a blockhead? I think, they all should work.

Regards, Daniel


Reply to: