Re: [Module::Build] Re: [Module-build-checkins] [svn:Module-Build] r5891 - in Module-Build/trunk: .
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <ke...@ma...> - 2006-04-12 17:34:03
|
On Apr 12, 2006, at 2:26 AM, demerphq wrote: > On 4/12/06, Ken Williams <ke...@ma...> wrote: >> >> On Apr 11, 2006, at 6:46 PM, Randy W. Sims wrote: >> >>> Ken Williams wrote: >>>> Hey, >>>> I wonder whether we should check for executability with "-x $file" >>>> rather than "(stat $file)[2] & 0111". Besides being simpler, it >>>> seems like it might DTRT on more platforms, where stat values >>>> might be nontrustworthy. >>> >>> You mean like so: >>> >>> $mode = 0444 | ( -x $file ? 0111 : 0 ); >> >> Yup, I'll make the change. > > Seems to me that if -x and stat with the appropriate mask arent > returning the same thing you have a bug in Perl. Not necessarily. On Unix, for example, if the permissions on a file you own are 0445, then "(stat $file)[2] & 0111" will return true but "-x $file" will return false. Maybe that means we're not using "the appropriate mask", but what would an appropriate mask be in all the situations we care about? Probably none exists. -Ken |