I'm having problems trying to get an embperl::req object in my imported
perl code (As objects)..

[- Execute ({'object'
=>'/home/user/dir/lib/web/whatever/whatever.pm',syntax => 'Perl'}) -]

http://perl.apache.org/embperl/pod/intro/IntroEmbperlObject.-page-5-.htm
says:

"This object is passed in on the stack, so you can retrieve it using the
Perl "shift" statement."

The first argument to my sub routines in whatever.pm, when imported as
objects, however, does not seem to be the same request object (Or a
request object at all? Looking at it...) I used in the caller for the
execution of the perl file.

It receives Embperl::__7=HASH(0xa8b0304) as the first argument (An
object reference?)..

I tried to use Data Dump on it, but it segfaulted Apache everytime.

I tried importing it to access sub routines "normally", but it didn't
find them in the current name space.

> -----Original Message-----
> From: Justin Harrison [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, July 25, 2002 9:12 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Execute
> 
> 
> Thank you Gerald. I love you.
> 
> > -----Original Message-----
> > From: Gerald Richter [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 25, 2002 7:45 PM
> > To: Justin Harrison; [EMAIL PROTECTED]
> > Subject: Re: Execute
> > 
> > 
> > 
> > 
> > > It seems to work in some fashion with Embperl Meta Subs..
> > >
> > > Is it by design that it seems not to function with perl subs? Am I
> > > doing something wrong? :-( Is there anyway to make it 
> function with 
> > > perl subs?
> > >
> > 
> > It also works with perl subs, but you either need to tell
> > Execute that you are loading pure Perl code or wrap your 
> > sub's inside of a [- -] block:
> > 
> > Either:
> > 
> > [- $r->{content} = Execute ({'object' =>
> > '/home/zo/zo/lib/zoweb/content/content.pm',
> > syntax => 'Perl'
> > }) -]
> > 
> > or
> > 
> > > > In content.pm:
> > > >
> > > > #package zoweb::content::content;
> > > > #use strict;
> > 
> > # Never put a package statement here, Embperl will setup the
> > package for you
> > 
> > [-
> > sub title {
> >  }
> > 
> > -]
> > 
> > Gerald
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to