Re: [htmltmpl] HTML::Template and filesystem ACL's
Brought to you by:
samtregar
From: <sa...@es...> - 2004-07-30 17:22:37
|
Sam Tregar wrote: > On Fri, 30 Jul 2004, S=E9bastien Aperghis-Tramoni wrote: > >> perlfunc recommends to C<use filetest 'access';> for better results=20= >> when >> running on a filesystem with ACL support. The filetest pragma seems=20= >> to be >> available since Perl 5.6. > > Is it lexical, or could a user use the pragma in their code and fix > HTML::Template's file tests? According to the doc, this pragma is lexical. >> But IIRC, the Cookbook recommended to forget all the -X tests (where=20= >> X =3D~ >> /[rwxo]/i) and simply open() the file then test after the error code. In fact, this remark is in the doc of the filetest pragma. > I think I'd take a patch in that direction, provided it produced the > same quality of error checking. Looking at the code, it seems it's even simpler that this: it's just=20 that you used -r to test if a file if still present on the filesystem=20 instead of -f or -e. Attached is the patch against version 2.7 to correct that. |