You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Neil Gunton <ne...@nilspace.com> on 2003/07/02 16:43:12 UTC

Embperl::Object not using 'path'?

Hi again Gerald,

Possible new bug for you in 2.0b9, relating to Embperl::Object. I have
the following (just the relevant bits included here):

base.epl:
   $global = shift;
   $global->{core} = Execute ({object => 'Core.epl'});

Core.epl:
    Execute ({isa => 'Utils.epl', path => '/www/lib/perl/Apache/'});

This produces the following error:

[1747]ERR: 404: Core.epl(1786): Not found 'Utils.epl', searched:
/www/vhosts/www.crazyguyonabike.com/htdocs/Utils.epl;

I think this means that Embperl::Object is not using the 'path' which
was passed in via the Execute method. This works fine under 1.3.

I have checked the 2.0 Embperl::Object documentation, and the only
mention I can see which seems to relate to this is for setting
'object_addpath' when calling Execute offline. So I tried changing
'path' to 'object_addpath' in the Execute call, but that didn't work,
same error.

If I add the EMBPERL_OBJECT_ADDPATH to my httpd.conf (wasn't using it
before) then it works ok.

So is object_addpath supposed to work, or should 'path' work as with
1.3? This is one example of a change that would break 1.3 code, if you
had to change 'path' to 'object_addpath'. There is a workaround for my
code with the httpd.conf option, but I can't speak for other people...
would it be possible to keep 'path' as the option name when calling
Execute?

Thanks,

-Neil

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


Re: Embperl::Object not using 'path'?

Posted by Gerald Richter <ri...@ecos.de>.
>     Execute ({isa => 'Utils.epl', path => '/www/lib/perl/Apache/'});
>

Try

     Execute ({isa => 'Utils.epl', path =>[ '/www/lib/perl/Apache/']});

path is an array ref now. You are right that breaks existing 1.3 code at
this point, but with the EMBPERL_PATH or EMBPERL_OBJECT_ADDPATH in your
httpd.conf you are able to work around this.

BTW. object_addpath also takes a array ref

Gerald



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