SPUG: perls 'test' -d cgi vs. command line.

Bryce Baril vaticide at gmail.com
Thu Feb 17 15:10:10 PST 2011


Off topic but... Interesting choice of delimiters...
 On Feb 17, 2011 2:42 PM, "Matthew Bustad" <mybustad at gmail.com> wrote:
> Here is a puzzle:
>
> Setting up gitweb on CentOS 5.5
>
> In the script segment:
>
---8<---Start---8<------8<------8<------8<------8<------8<------8<------8<---
> #!/usr/bin/perl
>
> # gitweb - simple web interface to track changes in git repositories
> #
> # (C) 2005-2006, Kay Sievers <kay.sievers at vrfy.org>
> # (C) 2005, Christian Gierke
> #
> # This program is licensed under the GPLv2
>
> open(O, ">>/tmp/fo");
>
> use 5.008;
> use strict;
> use warnings;
> use CGI qw(:standard :escapeHTML -nosticky);
> use CGI::Util qw(unescape);
> use CGI::Carp qw(fatalsToBrowser set_message);
> use Encode;
> use Fcntl ':mode';
> use File::Find qw();
> use File::Basename qw(basename);
> use Time::HiRes qw(gettimeofday tv_interval);
> binmode STDOUT, ':utf8';
>
> .
> .
> .
> my $projects_list = "/pub/git";
> printf(O "--\n%s-\n", $projects_list ); # debug printfs to
> isolate the error
> if (-d $projects_list) {
> printf(O "--\n%s-\n", $projects_list ); # debug printfs to
> isolate the error
> ---8<--- End
---8<------8<------8<------8<------8<------8<------8<------8<---
>
> The -d test of if /pub/git is a directory (it is) fails via cgi, but
> (as user apache)
> works via command line?
>
> Any ideas?
>
> -- Matthew
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays
> WEB PAGE: http://seattleperl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/spug-list/attachments/20110217/a466e419/attachment.html>


More information about the spug-list mailing list