Package: libcgi-formbuilder-perl Version: 3.05.01-7 Severity: normal (You'll probably want to forward this upstream.)
Consider this code, given a $form that has a field named "select" that is a select list, with one choice in it: foreach my $field ($form->field) { if ($field eq "select") { my @options=$field->options; print "@options "; my $options=$field->options; print "$options\n"; } } This prints "ARRAY(XXXX) 1". CGI::FormBuilder::Field's documentation says: my @o = $f->options; # options, aligned and sorted Which *seems* clear -- the options method, in array context returns an array. (And as we see above, in scalar context, returns the number of options.) But it took the concept of returning an array a bit too far, returning an array *reference*. I have not checked, but I have a suspicion this used to return a list, not an array reference, in some older version. Most likely, the bug was introduced when this line of code was added: @opt = optsort($self->sortopts, @opt) if $self->sortopts; The sortopts method is what returns the array reference, which is then shoved into a list, and returned. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libcgi-formbuilder-perl depends on: ii perl 5.10.1-5 Larry Wall's Practical Extraction Versions of packages libcgi-formbuilder-perl recommends: ii libhtml-parser-perl 3.62-1 collection of modules that parse H Versions of packages libcgi-formbuilder-perl suggests: ii libcgi-session-perl 4.41-1 persistent session data in CGI app ii libhtml-template-perl 2.9-1 HTML::Template : A module for usin pn libtemplate-perl <none> (no description available) ii libtext-template-perl 1.45-1 Text::Template perl module -- no debconf information -- see shy jo
signature.asc
Description: Digital signature