perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beau E. Cox" <b...@beaucox.com>
Subject I don't understand 'Execute' loading
Date Fri, 16 Apr 2004 06:53:52 GMT
Hi -

I don't understand how Execute works. I've been through the docs
and checked out eg/x/Execute.pl, but still it's not clicking.

I have a perl object in my document root -> 'document.pl'. It
contains methods (including init) for my site logic:

#/usr/bin/perl

use strict;
use warnings;

use Date::Format;
use DBI;
use Carp;

sub init
{
    my( $d, $r ) = @_;

    $r->{data}     = '';
    $r->{title}    = 'no title';
    $r->{document} = $d;
    0;
}
... and other methods ...

In my top level directory (where 'document.pl' lives) I load it
with:

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

All OK.

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:

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

and got:

[29303]ERR:  404: resume-base.epl(1): Not found '../document.pl', searched:

(note the 'searched:' is empty.)

Next I tried:

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

and got the same thing:

[29303]ERR: 404: resume-base.epl(1): Not found '../document.pl', searched:

What have I missed?

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