[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Param 'rm' in CAP::FillInForm


perl 5.6.1
C::A 4.03
H::FillInForm 1.05
CAP::FillInForm 0.14

Hello,

While testing your pleasant CAP::FillInForm I found out
strange behavior. I extracted it into these 3 files:

===========tmpl.cgi==============
#!/usr/local/bin/perl -w
# instance script, nothing special

use Tmpl;
$ENV{PATH}='/bin:/usr/bin';
my $form = Tmpl->new();
$form->run();
=================================
===========tmpl.tmpl=============
<form>
  Par: <input type=text name=rm><BR>
</form>
=================================
===========Tmpl.pm===============
package Tmpl;

use base 'CGI::Application';
use CGI::Application::Plugin::FillInForm (qw|fill_form|);
use HTML::FillInForm;
use strict;

sub setup {
   my $self = shift;
   $self->run_modes('show_fif'=>'show',
                    'show_pfif'=>'show',
                   );
}

sub show {
    my $self = shift;

    my $template = $self->load_tmpl('./tmpl.tmpl');

    # set rm param
    $self->query->param('rm', $self->get_current_runmode);

    if ($self->get_current_runmode eq 'show_fif') {
       # OK
       my $fif = new HTML::FillInForm;
       return $fif->fill(scalarref=>\$template->output,
                             fobject => $self->query);
    } else {
       # field 'rm' is not filled!
       return $self->fill_form(\$template->output);
    }
}

1;
=================================

While running http://server/cgi-bin/tmpl.cgi?rm=show_fif I get
'rm' field filled. But while running http://server/cgi-bin/tmpl.cgi?rm=show_pfif
it is not. Why?

It looks like in my configuration CAP::FillInForm has problems with filling
'rm' parameter. H::FillInForm hasn't such problems. Is it the case in your
environment either? I didn't explore CAP::FillInForm code, hoping Michael
Graham will take care:-)

Regards,
Wojciech Pietron

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.