You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Ilia Lobsanov <il...@lobsanov.com> on 2000/05/03 17:54:49 UTC

RE: help resolve complex mod_perl EPL framework

Dear Gerald,

Still no luck... However, now $optDisableFormData is 0, even though I have
options => 256 (also tried options => HTML::Embperl::optDisableFormData).

I am lost here...

Let me describe my process better:
1. Get form data using CGI_Lite into %IN
2. Pass fdat => \%IN and options => HTML::Embperl::optDisableFormData to
Execute an epl...
3. epl overrides default handle (OUT) to \$s. At this point,
$optDisableFormData is 0. epl calls pm...
4. pm prints html
5. epl outputs [+ $s +]

All works fine with GET.

arghhh... pulling hair... hopes it's a bug in Embperl...

ilia.


> -----Original Message-----
> From: Gerald Richter [mailto:richter@ecos.de]
> Sent: Wednesday, April 26, 2000 3:49 PM
> To: Ilia Lobsanov; embperl@perl.apache.org
> Subject: RE: help resolve complex mod_perl EPL framework
>
>
> >
> > Yes it does print 1. Problem still stands. :(
> >
>
> You could try to set $ENV{CONTENT_LENGTH} = 0 ; before the call
> to Execute,
> but this really shouldn't be nessecary.
>
> Maybe there is another call that tries to read the POSTed data a second
> time?
>
> Gerald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


RE: help resolve complex mod_perl EPL framework

Posted by Gerald Richter <ri...@ecos.de>.
>
> I see... the problem is that I don't want to modify the pm ($r->content
> etc)... there are many of them. The whole point of me doing all this
> backwards is to make as little changes as possible to the legacy pm's.
> Is it possible to somehow refill STDIN...?
>

No, you can't refill stdin. You can take the form data and put them into
$r -> args, then must must belive your module that it has to take the form
data from args instead of content

Gerald


> thank you.
>
> ilia.
>
> > -----Original Message-----
> > From: Gerald Richter [mailto:richter@ecos.de]
> > Sent: Wednesday, May 03, 2000 1:25 PM
> > To: Ilia Lobsanov; embperl@perl.apache.org
> > Subject: RE: help resolve complex mod_perl EPL framework
> >
> >
> > >
> > > sorry, forgot one more thing in step 4... pm reads $r->content or
> > > $r->args.
> > > The former fails.
> > >
> >
> > And that's your error! CGI_lite has already read the form data,
> you cannot
> > read it again with $r -> content ($r -> content tries to read the
> > form data
> > from stdin, where CGI_lite has them already read from). You need
> > to pass the
> > formdata from CGI_lite to your module, and doen't reread them!
> >
> > No bug in Embperl :-)
> >
> > Gerald
> >
> >
> > > ilia.
> > >
> > > > -----Original Message-----
> > > > From: Ilia Lobsanov [mailto:ilia@lobsanov.com]
> > > > Sent: Wednesday, May 03, 2000 11:55 AM
> > > > To: Gerald Richter; embperl@perl.apache.org
> > > > Subject: RE: help resolve complex mod_perl EPL framework
> > > >
> > > >
> > > > Dear Gerald,
> > > >
> > > > Still no luck... However, now $optDisableFormData is 0, even
> > > though I have
> > > > options => 256 (also tried options =>
> > > HTML::Embperl::optDisableFormData).
> > > >
> > > > I am lost here...
> > > >
> > > > Let me describe my process better:
> > > > 1. Get form data using CGI_Lite into %IN
> > > > 2. Pass fdat => \%IN and options =>
> > HTML::Embperl::optDisableFormData to
> > > > Execute an epl...
> > > > 3. epl overrides default handle (OUT) to \$s. At this point,
> > > > $optDisableFormData is 0. epl calls pm...
> > > > 4. pm prints html
> > > > 5. epl outputs [+ $s +]
> > > >
> > > > All works fine with GET.
> > > >
> > > > arghhh... pulling hair... hopes it's a bug in Embperl...
> > > >
> > > > ilia.
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Gerald Richter [mailto:richter@ecos.de]
> > > > > Sent: Wednesday, April 26, 2000 3:49 PM
> > > > > To: Ilia Lobsanov; embperl@perl.apache.org
> > > > > Subject: RE: help resolve complex mod_perl EPL framework
> > > > >
> > > > >
> > > > > >
> > > > > > Yes it does print 1. Problem still stands. :(
> > > > > >
> > > > >
> > > > > You could try to set $ENV{CONTENT_LENGTH} = 0 ; before the call
> > > > > to Execute,
> > > > > but this really shouldn't be nessecary.
> > > > >
> > > > > Maybe there is another call that tries to read the POSTed
> > > data a second
> > > > > time?
> > > > >
> > > > > Gerald
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > 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
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> > >
> >
> >
>
>


RE: help resolve complex mod_perl EPL framework

Posted by Ilia Lobsanov <il...@lobsanov.com>.
I see... the problem is that I don't want to modify the pm ($r->content
etc)... there are many of them. The whole point of me doing all this
backwards is to make as little changes as possible to the legacy pm's.
Is it possible to somehow refill STDIN...?

thank you.

ilia.

> -----Original Message-----
> From: Gerald Richter [mailto:richter@ecos.de]
> Sent: Wednesday, May 03, 2000 1:25 PM
> To: Ilia Lobsanov; embperl@perl.apache.org
> Subject: RE: help resolve complex mod_perl EPL framework
>
>
> >
> > sorry, forgot one more thing in step 4... pm reads $r->content or
> > $r->args.
> > The former fails.
> >
>
> And that's your error! CGI_lite has already read the form data, you cannot
> read it again with $r -> content ($r -> content tries to read the
> form data
> from stdin, where CGI_lite has them already read from). You need
> to pass the
> formdata from CGI_lite to your module, and doen't reread them!
>
> No bug in Embperl :-)
>
> Gerald
>
>
> > ilia.
> >
> > > -----Original Message-----
> > > From: Ilia Lobsanov [mailto:ilia@lobsanov.com]
> > > Sent: Wednesday, May 03, 2000 11:55 AM
> > > To: Gerald Richter; embperl@perl.apache.org
> > > Subject: RE: help resolve complex mod_perl EPL framework
> > >
> > >
> > > Dear Gerald,
> > >
> > > Still no luck... However, now $optDisableFormData is 0, even
> > though I have
> > > options => 256 (also tried options =>
> > HTML::Embperl::optDisableFormData).
> > >
> > > I am lost here...
> > >
> > > Let me describe my process better:
> > > 1. Get form data using CGI_Lite into %IN
> > > 2. Pass fdat => \%IN and options =>
> HTML::Embperl::optDisableFormData to
> > > Execute an epl...
> > > 3. epl overrides default handle (OUT) to \$s. At this point,
> > > $optDisableFormData is 0. epl calls pm...
> > > 4. pm prints html
> > > 5. epl outputs [+ $s +]
> > >
> > > All works fine with GET.
> > >
> > > arghhh... pulling hair... hopes it's a bug in Embperl...
> > >
> > > ilia.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Gerald Richter [mailto:richter@ecos.de]
> > > > Sent: Wednesday, April 26, 2000 3:49 PM
> > > > To: Ilia Lobsanov; embperl@perl.apache.org
> > > > Subject: RE: help resolve complex mod_perl EPL framework
> > > >
> > > >
> > > > >
> > > > > Yes it does print 1. Problem still stands. :(
> > > > >
> > > >
> > > > You could try to set $ENV{CONTENT_LENGTH} = 0 ; before the call
> > > > to Execute,
> > > > but this really shouldn't be nessecary.
> > > >
> > > > Maybe there is another call that tries to read the POSTed
> > data a second
> > > > time?
> > > >
> > > > Gerald
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > 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
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
>
>


RE: help resolve complex mod_perl EPL framework

Posted by Gerald Richter <ri...@ecos.de>.
>
> sorry, forgot one more thing in step 4... pm reads $r->content or
> $r->args.
> The former fails.
>

And that's your error! CGI_lite has already read the form data, you cannot
read it again with $r -> content ($r -> content tries to read the form data
from stdin, where CGI_lite has them already read from). You need to pass the
formdata from CGI_lite to your module, and doen't reread them!

No bug in Embperl :-)

Gerald


> ilia.
>
> > -----Original Message-----
> > From: Ilia Lobsanov [mailto:ilia@lobsanov.com]
> > Sent: Wednesday, May 03, 2000 11:55 AM
> > To: Gerald Richter; embperl@perl.apache.org
> > Subject: RE: help resolve complex mod_perl EPL framework
> >
> >
> > Dear Gerald,
> >
> > Still no luck... However, now $optDisableFormData is 0, even
> though I have
> > options => 256 (also tried options =>
> HTML::Embperl::optDisableFormData).
> >
> > I am lost here...
> >
> > Let me describe my process better:
> > 1. Get form data using CGI_Lite into %IN
> > 2. Pass fdat => \%IN and options => HTML::Embperl::optDisableFormData to
> > Execute an epl...
> > 3. epl overrides default handle (OUT) to \$s. At this point,
> > $optDisableFormData is 0. epl calls pm...
> > 4. pm prints html
> > 5. epl outputs [+ $s +]
> >
> > All works fine with GET.
> >
> > arghhh... pulling hair... hopes it's a bug in Embperl...
> >
> > ilia.
> >
> >
> > > -----Original Message-----
> > > From: Gerald Richter [mailto:richter@ecos.de]
> > > Sent: Wednesday, April 26, 2000 3:49 PM
> > > To: Ilia Lobsanov; embperl@perl.apache.org
> > > Subject: RE: help resolve complex mod_perl EPL framework
> > >
> > >
> > > >
> > > > Yes it does print 1. Problem still stands. :(
> > > >
> > >
> > > You could try to set $ENV{CONTENT_LENGTH} = 0 ; before the call
> > > to Execute,
> > > but this really shouldn't be nessecary.
> > >
> > > Maybe there is another call that tries to read the POSTed
> data a second
> > > time?
> > >
> > > Gerald
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


RE: help resolve complex mod_perl EPL framework

Posted by Ilia Lobsanov <il...@lobsanov.com>.
sorry, forgot one more thing in step 4... pm reads $r->content or $r->args.
The former fails.

ilia.

> -----Original Message-----
> From: Ilia Lobsanov [mailto:ilia@lobsanov.com]
> Sent: Wednesday, May 03, 2000 11:55 AM
> To: Gerald Richter; embperl@perl.apache.org
> Subject: RE: help resolve complex mod_perl EPL framework
>
>
> Dear Gerald,
>
> Still no luck... However, now $optDisableFormData is 0, even though I have
> options => 256 (also tried options => HTML::Embperl::optDisableFormData).
>
> I am lost here...
>
> Let me describe my process better:
> 1. Get form data using CGI_Lite into %IN
> 2. Pass fdat => \%IN and options => HTML::Embperl::optDisableFormData to
> Execute an epl...
> 3. epl overrides default handle (OUT) to \$s. At this point,
> $optDisableFormData is 0. epl calls pm...
> 4. pm prints html
> 5. epl outputs [+ $s +]
>
> All works fine with GET.
>
> arghhh... pulling hair... hopes it's a bug in Embperl...
>
> ilia.
>
>
> > -----Original Message-----
> > From: Gerald Richter [mailto:richter@ecos.de]
> > Sent: Wednesday, April 26, 2000 3:49 PM
> > To: Ilia Lobsanov; embperl@perl.apache.org
> > Subject: RE: help resolve complex mod_perl EPL framework
> >
> >
> > >
> > > Yes it does print 1. Problem still stands. :(
> > >
> >
> > You could try to set $ENV{CONTENT_LENGTH} = 0 ; before the call
> > to Execute,
> > but this really shouldn't be nessecary.
> >
> > Maybe there is another call that tries to read the POSTed data a second
> > time?
> >
> > Gerald
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>