perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Grimm <edgr...@dsblade00.wat.us.ray.com>
Subject Re: If -f Before Execute
Date Sat, 27 Sep 2003 00:58:27 GMT
1. It better be clear what the current working directory is, if you are
going to depend on it.
2. What it is depends upon whether chdir is supported in your Apache
platform, IIRC.

Note that I am using 1.x still, so Execute is, in fact, part of
HTML::Embperl.  Also note that my real code uses chdir; this is merely
an example that doesn't.

  [- $dir = '/usr/local/WWW.codepages';
     $subpage = ${$rec}{type} . '.epl';
     if (! -f "$dir/$subpage") {
	 $subpage = 'default.epl';
     } -]
  [- HTML::Embperl::Execute({ inputfile => "$dir/$subpage",
                            escmode => 0 }); -]

Ed

On Fri, 26 Sep 2003, Cameron B. Prince wrote:

> Hi,
>
> Does anyone have an example of a way to do a file existence test before
> executing a file to include? It's not clear to me what the current working
> directory is.
>
> Thanks,
> Cameron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message