I'm using EmbperlObject to render a set of pages, which works quite nicely.
On several of those pages, I'd like to place a PerlHandler that processes
form contents prior to rendering of the EmbperlObject template.  In the
case that a form parameter is missing, I'd like to issue an
internal_redirect to the appropriate form requesting that the field be
completed.

That works fine - the correct EmbperlObject is Executed, the base is
wrapped around it, etc.  The problem is that %fdat is not being populated
in the EmbperlObject template.  In the EmbperlObject template, I can see
the correct form variables in $req_rec->args() and in $ENV{QUERY_STRING}
(if the internal redirect has a query string), but %fdat simply is not
being populated.

Using HTML::Embperl 1.3.2
      Apache 1.3.20
      mod_perl 1.25

Following is the appropriate section from httpd.conf:

  PerlSetEnv EMBPERL_ESCMODE 0
  PerlSetEnv EMBPERL_OPTIONS 16
  PerlSetEnv EMBPERL_OBJECT_BASE base.html
  PerlSetEnv EMBPERL_OBJECT_FALLBACK notfound.html
  PerlSetEnv EMBPERL_DEBUG 0

  Alias /register /home/register/templates
  PerlModule MyMod::Registration
  <Location /register/basic.html>
    SetHandler  perl-script
    PerlHandler MyMod::Registration::basic \
                HTML::EmbperlObject
    Options     ExecCGI    
  </Location>
  <Location /register/contact.html>
    SetHandler  perl-script
    PerlHandler MyMod::Registration::contact \
                HTML::EmbperlObject
    Options     ExecCGI    
  </Location>
  <LocationMatch "^/register/.*\.epl$">
    Order allow,deny
    Deny From all
  </LocationMatch>
  <LocationMatch "^/register/.*/base.html$">
    Order allow,deny
    Deny From all
  </LocationMatch>

MyMod::Registration::contact simply issues an internal redirect to 
'/register/basic.html'.  MyMod::Registration::basic simply logs $r->args()
(which is correct).

I'll probably go ahead and try to Execute HTML::EmbperlObject from
MyMod::Registration::contact, but I think an internal redirect is a
cleaner solution.

Any help would be most appreciated!


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

Reply via email to