You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Hoenie Luk <ai...@theearth.com> on 2003/07/05 22:48:45 UTC

How to make %udat and %fdat available in Perl package?

Hi all,

I am using EmbPerl in cgi mode via embpcgi.pl and hiding most of the Perl 
code as subroutines in a .pm package. Is there anyway to configure EmbPerl 
so that %udat and %fdat are always available to the Perl code in my package 
(without having to always pass \%udat and \%fdat as arguments when the 
subroutines are called from EmbPerl code in my html pages)?

......Hoenie


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


Re: How to make %udat and %fdat available in Perl package?

Posted by Gerald Richter <ri...@ecos.de>.
>
> I am using EmbPerl in cgi mode via embpcgi.pl and hiding most of the Perl
> code as subroutines in a .pm package. Is there anyway to configure EmbPerl
> so that %udat and %fdat are always available to the Perl code in my
package
> (without having to always pass \%udat and \%fdat as arguments when the
> subroutines are called from EmbPerl code in my html pages)?
>

In 1.3 you can access %HTML::Embperl::udat and %HTML::Embperl::fdat. This
will not work in 2.0.

In 2.0 you can access

$Embperl::req -> component -> param -> fdat

and

$Embperl::req -> app -> udat

both return a reference to a hash

Gerald




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