~ubuntu-branches/ubuntu/vivid/libcgi-formbuilder-perl/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/0007-Comment-that-cgi_param-is-context-sensitive-just-lik.patch/lib/CGI/FormBuilder.pm

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard, Simon McVittie
  • Date: 2014-11-15 15:58:40 UTC
  • Revision ID: package-import@ubuntu.com-20141115155840-efg9763exm6xjs0r
Tags: 3.09-2
[ Simon McVittie ]
Merge patches 0005-0006 into 0004, and adapt to retain support for
objects that mimic the CGI.pm API but do not have param_fetch.
Closes: bug#769240. Thanks to Simon McVittie.

Show diffs side-by-side

added added

removed removed

Lines of Context:
855
855
 
856
856
    # Make sure to get all values
857
857
    for my $p (@keep) {
858
 
        for my $v (@{$self->{params}->param_fetch($p)}) {
 
858
        my @values;
 
859
        if ($self->{params}->can('param_fetch')) {
 
860
            @values = @{$self->{params}->param_fetch($p)};
 
861
        }
 
862
        else {
 
863
            # array-context calls to param($p) are deprecated in
 
864
            # CGI.pm, but some other objects that mimic
 
865
            # its interface don't have param_fetch
 
866
            @values = $self->{params}->param($p);
 
867
        }
 
868
 
 
869
        for my $v (@values) {
859
870
            debug 1, "keepextras: saving hidden param $p = $v";
860
871
            push @html, htmltag('input', name => $p, type => 'hidden', value => $v);
861
872
        }