Does the -f file test operator work in mod_perl?

The Apache process also needs read and execute access on every subdirectory up to the full path. (If symbolic links are involved, it will be trickier to determine what the accesses are) If you can debug the script in place on the web server, you might want to get Perl to deliver you an error message: if (! -f $filename) { open(ACK.

The Apache process also needs read and execute access on every subdirectory up to the full path. (If symbolic links are involved, it will be trickier to determine what the accesses are). If you can debug the script in place on the web server, you might want to get Perl to deliver you an error message: if (! -f $filename) { open(ACK, "\n"; }.

3 Only execute access to be precise. – Gleb Oct 1 '09 at 18:24 @Gleb - Good point! – mob Oct 1 '09 at 18:43 I feel stupid not thinking of that, particularly since I saw a question with the same problem on ServerFault earlier today.

– Powerlord Oct 1 '09 at 19:57.

F will return false if the file doesn't exist but undef if the stat call failed for some other reason. Test if the return is defined and if it is not, show the error that will have been set in $!. That may give you a clue.

Give -f the full path to the file, and make sure it is readable by Apache.

Your assumptions about the current directory may simply be wrong.

I'm going to totally ignore what you asked and answer something completely different instead! I'm just that crazy! Well, not really, I'm leveraging a core perl module, File::Find, instead of writing my own directory parser.

On request, here's the question I'm actually answering: "How do I find the path to a file that is somewhere in a sub-directory of a specific set of paths? " use File::Find; # Other parts of the class here sub find_template_file { my ($this, $filename) = @_; my $file_path; my $path = $this->{path}; # Note that this inner sub uses variables we defined above find(sub { if ($_ eq $filename) $file_path = $File::Find::name; }, @$path); if ($file_path) return $file_path; my $s = $path? ("'" .

Join("','", @$path) . "'") : ''; die "Tenjin::Engine: $filename not found (path=$s). "; }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions