You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Mark Dedlow <mt...@lbl.gov> on 2002/09/03 21:18:47 UTC

using CGI within Embperl

I'm want to drop some existing code that uses CGI.pm into Embperl,
but Embperl grabs POST'ed data, so CGI doesn't have it.  By changing
my 'new CGI()' statements to 'new CGI(\%fdat);', my existing CGI-based
code seems to work as expected.  Is this the way other folks approach
the issue, or is there some other technique, perhaps some automagical
Embperl thing?

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


Re: using CGI within Embperl

Posted by "Luiz Fernando B. Ribeiro" <lu...@engenhosolucoes.com.br>.
Em Tue, 3 Sep 2002 12:18:47 -0700
"Mark Dedlow" <mt...@lbl.gov> escreveu:

> I'm want to drop some existing code that uses CGI.pm into Embperl,
> but Embperl grabs POST'ed data, so CGI doesn't have it.  By changing
> my 'new CGI()' statements to 'new CGI(\%fdat);', my existing CGI-based
> code seems to work as expected.  Is this the way other folks approach
> the issue, or is there some other technique, perhaps some automagical
> Embperl thing?
> 

Hi,

Try porting your scripts to the Embperl "idiom", take a look at the
man page >perldoc HTML::Embperl. You will discover that Embperl is a
rich enviroment and you will be alot more productive.

To access the form fields in a Embperl page use the %fdat hash:
	$fdat{Name}	# CGI = param('Name');


Regards,

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet

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


Re: using CGI within Embperl

Posted by Gavin Carr <ga...@openfusion.com.au>.
Try adding 256 to your EMBPERL_OPTIONS:

         optDisableFormData = 256
             This option disables the setup of %fdat and @ffld.  Embperl
             will not do anything with the posted form data.  Set this
             when using Execute from your perl script and you have
             already read the Form Data (via eg. CGI.pm).

Cheers,
Gavin

On Tue, Sep 03, 2002 at 12:18:47PM -0700, Mark Dedlow wrote:
> I'm want to drop some existing code that uses CGI.pm into Embperl,
> but Embperl grabs POST'ed data, so CGI doesn't have it.  By changing
> my 'new CGI()' statements to 'new CGI(\%fdat);', my existing CGI-based
> code seems to work as expected.  Is this the way other folks approach
> the issue, or is there some other technique, perhaps some automagical
> Embperl thing?

-- 
Open Fusion P/L - Open Source Business Solutions [ Linux - Perl - Apache ]
http://www.openfusion.com.au
- Fashion is a variable, but style is a constant - Programming Perl

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