perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beau E. Cox" <b...@beaucox.com>
Subject Re: I don't understand 'Execute' loading
Date Wed, 21 Apr 2004 20:43:42 GMT
On Saturday 17 April 2004 04:53 pm, Angus Lees wrote:
> At Thu, 15 Apr 2004 20:53:52 -1000, Beau E. Cox wrote:
> > In lower-level directories, I want to use the same object. Thinking
> > the "../" was 'magic' to Execute (it would search up from the
> > current directory to the top looking for the object), I tried:
>
> Path searching only happens automatically when running under
> Embperl::Object.  Are you using Embperl::Object, or vanilla Embperl
> pages?
>
> With Embperl::Object, a default search path is supplied consisting of
> all directories from the page actually requested, up to where Embperl
> finds the "base" file.  In Embperl::Object "../$foo" means start
> searching from where you currently are in the search path (used to
> find "superclasses").
>
> Without Embperl::Object you can supply an explicit search path and
> still get these features.  See "Embperl_Path" in the Embperl::Config
> manpage.

OK. I thought I was using Embperl::Object, but now I'm trying
Embperl_Path.

My htdocs tree on my test server:

 /home/test/httpd/2.1/hsdocs/resume - main content
   document-base.epl, etc.
 /home/test/httpd/2.1/hsdocs/resume/objects - embperl loaded objects
   document.pl

In document-base.epl:

... new and other subroutines above
[-
 $r = shift;
 $r->new;

 $d = Execute( { object => "document.pl",
                 syntax => 'Perl' } );
...

my httpd.conf:

Embperl_Path "/home/test/httpd/2.1/htdocs/resume/objects"

<VirtualHost localhost:8080>
  ServerName resume.test.com
  DocumentRoot "/home/test/httpd/2.1/htdocs/resume"
  <Directory "/home/test/httpd/2.1/htdocs/resume">
    EMBPERL_APPNAME my_resume_app
    EMBPERL_OBJECT_BASE document-base.epl
    <FilesMatch "\.html$">
       SetHandler perl-script
       PerlHandler Embperl::Object 
       Options ExecCGI
    </FilesMatch>
    <FilesMatch ".*\.epl$">
       Order allow,deny
       Deny From all
    </FilesMatch>
  </Directory>
</VirtualHost>

FAILED. error_log:

[Wed Apr 21 10:33:50 2004] [error] [7553]ERR:  404: document-base.epl(1): Not 
found 'document.pl', 
searched: /home/test/httpd/2.1/htdocs/resume/document.pl;

Note that my 'Embperl_Path' does NOT appear in the searched path
shown in the logged error.

If I explicitly point my Execute to the absolute path of document.pl,
it works (but of course I don't want to have to do that).

What am I missing?

Aloha => Beau;


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


Mime
View raw message