You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Martin Moss <ma...@btopenworld.com> on 2005/02/16 11:08:13 UTC

Req_rec undefined when calling Embperl::Execute from within a mod_perl Method handler

All,

I'm trying to call Embperl::Execute to run an epl from
within a mod perl method handler, and when the script
runs  

---snip----
print STDERR Dumper($r); 
Embperl::Execute({
                                req_rec=>$r,
                         
inputfile=>'/www/components/nav/htmlhead.epl',
                                param     => [$config,
$ad_tags],
                                output => \$html
                        });

-----snip-----
$req_rec is undefined, ever since we upgraded from
Embperl2.0b4dev5  to 2.0 release Candidate 2...

The Dumper in the method handler results in the
following
$VAR1 = bless( {
                 'r' => bless( do{\(my $o =
27791880)}, 'Apache::Request' )
               }, 'My::Apache::Request' );

But when I dump Req_rec in the epl, I get
$VAR1=undef

Under the first version, I didn't even have to set
Req_rec - as the docs say this is no longer necessary.
I just added it above to see if I could  set it that
way.

Is there something I must do to set the Request
object.. We use a custom one which I'd like to pass
through to the epl script.

I realise I could pass the Apache Request object
through as a parameter, but that will make the epl
rather untidy... And would seem to me to be a hack not
a fix..

Can anybody shed any light on this?

Regards

Marty


	
	
		
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

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


Re: Req_rec undefined when calling Embperl::Execute from within a mod_perl Method handler

Posted by Martin Moss <ma...@btopenworld.com>.
No worries,

thanks Gerald,

Marty 

--- Gerald Richter <ri...@ecos.de> wrote: 
> Hi,
> 
> I have found the problem and trying to resolve it.
> Just give me a few days 
> time...
> 
> Gerald
> 
> 
> Am Donnerstag, 17. Februar 2005 15:18 schrieb Martin
> Moss:
> > Hi Gerald,
> >
> > We're using :-
> >
> > Apache 1.3.33, mod_perl-1.29, perl v5.8.6 on SunOS
> 5.7
> > Generic_106541-10 sun4u sparc
> > SUNW,UltraSPARC-IIi-cEngine
> >
> > Regards
> >
> > Marty
> >
> >  --- Gerald Richter <ri...@ecos.de> wrote:
> > > > I'm trying to call Embperl::Execute to run an
> epl
> > >
> > > from within
> > >
> > > > a mod perl method handler, and when the script
> > >
> > > runs
> > >
> > >
> > > Which version of mod_perl do you using?
> > >
> > > Gerald
> > >
> > > > ---snip----
> > > > print STDERR Dumper($r);
> > > > Embperl::Execute({
> > > >                                 req_rec=>$r,
> > > >
> > > > inputfile=>'/www/components/nav/htmlhead.epl',
> > > >                                 param     =>
> > >
> > > [$config,
> > >
> > > > $ad_tags],
> > > >                                 output =>
> \$html
> > > >                         });
> > > >
> > > > -----snip-----
> > > > $req_rec is undefined, ever since we upgraded
> from
> > > > Embperl2.0b4dev5  to 2.0 release Candidate
> 2...
> > > >
> > > > The Dumper in the method handler results in
> the
> > >
> > > following
> > >
> > > > $VAR1 = bless( {
> > > >                  'r' => bless( do{\(my $o =
> > >
> > > 27791880)},
> > >
> > > > 'Apache::Request' )
> > > >                }, 'My::Apache::Request' );
> > > >
> > > > But when I dump Req_rec in the epl, I get
> > >
> > > $VAR1=undef
> > >
> > > > Under the first version, I didn't even have to
> set
> > >
> > > Req_rec -
> > >
> > > > as the docs say this is no longer necessary.
> > > > I just added it above to see if I could  set
> it
> > >
> > > that way.
> > >
> > > > Is there something I must do to set the
> Request
> > >
> > > object.. We
> > >
> > > > use a custom one which I'd like to pass
> through to
> > >
> > > the epl script.
> > >
> > > > I realise I could pass the Apache Request
> object
> > >
> > > through as a
> > >
> > > > parameter, but that will make the epl rather
> > >
> > > untidy... And
> > >
> > > > would seem to me to be a hack not a fix..
> > > >
> > > > Can anybody shed any light on this?
> > > >
> > > > Regards
> > > >
> > > > Marty
> >
> >
>
___________________________________________________________
> >
> > > > ALL-NEW Yahoo! Messenger - all new features -
> even
> > >
> > > more fun!
> > >
> > > > http://uk.messenger.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> >
> > > > 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
> >
> >
>
___________________________________________________________
> > ALL-NEW Yahoo! Messenger - all new features - even
> more fun!
> > http://uk.messenger.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail:
> embperl-help@perl.apache.org
>  


	
	
		
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

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


Re: Req_rec undefined when calling Embperl::Execute from within a mod_perl Method handler

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

I have found the problem and trying to resolve it. Just give me a few days 
time...

Gerald


Am Donnerstag, 17. Februar 2005 15:18 schrieb Martin Moss:
> Hi Gerald,
>
> We're using :-
>
> Apache 1.3.33, mod_perl-1.29, perl v5.8.6 on SunOS 5.7
> Generic_106541-10 sun4u sparc
> SUNW,UltraSPARC-IIi-cEngine
>
> Regards
>
> Marty
>
>  --- Gerald Richter <ri...@ecos.de> wrote:
> > > I'm trying to call Embperl::Execute to run an epl
> >
> > from within
> >
> > > a mod perl method handler, and when the script
> >
> > runs
> >
> >
> > Which version of mod_perl do you using?
> >
> > Gerald
> >
> > > ---snip----
> > > print STDERR Dumper($r);
> > > Embperl::Execute({
> > >                                 req_rec=>$r,
> > >
> > > inputfile=>'/www/components/nav/htmlhead.epl',
> > >                                 param     =>
> >
> > [$config,
> >
> > > $ad_tags],
> > >                                 output => \$html
> > >                         });
> > >
> > > -----snip-----
> > > $req_rec is undefined, ever since we upgraded from
> > > Embperl2.0b4dev5  to 2.0 release Candidate 2...
> > >
> > > The Dumper in the method handler results in the
> >
> > following
> >
> > > $VAR1 = bless( {
> > >                  'r' => bless( do{\(my $o =
> >
> > 27791880)},
> >
> > > 'Apache::Request' )
> > >                }, 'My::Apache::Request' );
> > >
> > > But when I dump Req_rec in the epl, I get
> >
> > $VAR1=undef
> >
> > > Under the first version, I didn't even have to set
> >
> > Req_rec -
> >
> > > as the docs say this is no longer necessary.
> > > I just added it above to see if I could  set it
> >
> > that way.
> >
> > > Is there something I must do to set the Request
> >
> > object.. We
> >
> > > use a custom one which I'd like to pass through to
> >
> > the epl script.
> >
> > > I realise I could pass the Apache Request object
> >
> > through as a
> >
> > > parameter, but that will make the epl rather
> >
> > untidy... And
> >
> > > would seem to me to be a hack not a fix..
> > >
> > > Can anybody shed any light on this?
> > >
> > > Regards
> > >
> > > Marty
>
> ___________________________________________________________
>
> > > ALL-NEW Yahoo! Messenger - all new features - even
> >
> > more fun!
> >
> > > http://uk.messenger.yahoo.com
>
> ---------------------------------------------------------------------
>
> > > 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
>
> ___________________________________________________________
> ALL-NEW Yahoo! Messenger - all new features - even more fun!
> http://uk.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> 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


RE: Req_rec undefined when calling Embperl::Execute from within a mod_perl Method handler

Posted by Martin Moss <ma...@btopenworld.com>.
Hi Gerald,

We're using :-

Apache 1.3.33, mod_perl-1.29, perl v5.8.6 on SunOS 5.7
Generic_106541-10 sun4u sparc
SUNW,UltraSPARC-IIi-cEngine

Regards

Marty

 --- Gerald Richter <ri...@ecos.de> wrote: 
> > 
> > I'm trying to call Embperl::Execute to run an epl
> from within 
> > a mod perl method handler, and when the script
> runs  
> > 
> 
> Which version of mod_perl do you using?
> 
> Gerald
> 
>  
> 
> > ---snip----
> > print STDERR Dumper($r);
> > Embperl::Execute({
> >                                 req_rec=>$r,
> >                          
> > inputfile=>'/www/components/nav/htmlhead.epl',
> >                                 param     =>
> [$config,
> > $ad_tags],
> >                                 output => \$html
> >                         });
> > 
> > -----snip-----
> > $req_rec is undefined, ever since we upgraded from
> > Embperl2.0b4dev5  to 2.0 release Candidate 2...
> > 
> > The Dumper in the method handler results in the
> following
> > $VAR1 = bless( {
> >                  'r' => bless( do{\(my $o =
> 27791880)}, 
> > 'Apache::Request' )
> >                }, 'My::Apache::Request' );
> > 
> > But when I dump Req_rec in the epl, I get
> $VAR1=undef
> > 
> > Under the first version, I didn't even have to set
> Req_rec - 
> > as the docs say this is no longer necessary.
> > I just added it above to see if I could  set it
> that way.
> > 
> > Is there something I must do to set the Request
> object.. We 
> > use a custom one which I'd like to pass through to
> the epl script.
> > 
> > I realise I could pass the Apache Request object
> through as a 
> > parameter, but that will make the epl rather
> untidy... And 
> > would seem to me to be a hack not a fix..
> > 
> > Can anybody shed any light on this?
> > 
> > Regards
> > 
> > Marty
> > 
> > 
> > 	
> > 	
> > 		
> >
>
___________________________________________________________
> > ALL-NEW Yahoo! Messenger - all new features - even
> more fun! 
> > http://uk.messenger.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > 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
> 
>  


	
	
		
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

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


RE: Req_rec undefined when calling Embperl::Execute from within a mod_perl Method handler

Posted by Gerald Richter <ri...@ecos.de>.
> 
> I'm trying to call Embperl::Execute to run an epl from within 
> a mod perl method handler, and when the script runs  
> 

Which version of mod_perl do you using?

Gerald

 

> ---snip----
> print STDERR Dumper($r);
> Embperl::Execute({
>                                 req_rec=>$r,
>                          
> inputfile=>'/www/components/nav/htmlhead.epl',
>                                 param     => [$config,
> $ad_tags],
>                                 output => \$html
>                         });
> 
> -----snip-----
> $req_rec is undefined, ever since we upgraded from
> Embperl2.0b4dev5  to 2.0 release Candidate 2...
> 
> The Dumper in the method handler results in the following
> $VAR1 = bless( {
>                  'r' => bless( do{\(my $o = 27791880)}, 
> 'Apache::Request' )
>                }, 'My::Apache::Request' );
> 
> But when I dump Req_rec in the epl, I get $VAR1=undef
> 
> Under the first version, I didn't even have to set Req_rec - 
> as the docs say this is no longer necessary.
> I just added it above to see if I could  set it that way.
> 
> Is there something I must do to set the Request object.. We 
> use a custom one which I'd like to pass through to the epl script.
> 
> I realise I could pass the Apache Request object through as a 
> parameter, but that will make the epl rather untidy... And 
> would seem to me to be a hack not a fix..
> 
> Can anybody shed any light on this?
> 
> Regards
> 
> Marty
> 
> 
> 	
> 	
> 		
> ___________________________________________________________
> ALL-NEW Yahoo! Messenger - all new features - even more fun! 
> http://uk.messenger.yahoo.com
> 
> ---------------------------------------------------------------------
> 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