[html-formfu] undefined variable issue

Rod Taylor rod.taylor at gmail.com
Thu Aug 28 00:27:38 BST 2008


HTML::FormFu 0.03003 seems to have an attribute with an undefined
value. Don't recall seeing these warnings with 0.03001.

"Use of uninitialized value in sprintf at
/usr/local/lib/perl5/site_perl/5.8.8/HTML/FormFu/Util.pm line 318."

The below patch will silence the warning. I did not investigate to see
if the warnings should be there or not.

The attached .yml file defines a simple form causing the problem
though I have many others if necessary.


*** /usr/local/lib/perl5/site_perl/5.8.8/HTML/FormFu/Util.pm.orig
 Wed Aug 27 19:19:22 2008
--- /usr/local/lib/perl5/site_perl/5.8.8/HTML/FormFu/Util.pm    Wed
Aug 27 19:20:19 2008
***************
*** 315,321 ****
      eval { my %attrs =3D %$attrs };
      croak $@ if $@;

!     my $xml =3D join " ", map { sprintf qq{%s=3D"%s"}, $_, $attrs->{$_} }
          sort keys %$attrs;

      $xml =3D " $xml"
--- 315,321 ----
      eval { my %attrs =3D %$attrs };
      croak $@ if $@;

!     my $xml =3D join " ", map { sprintf qq{%s=3D"%s"}, $_, $attrs->{$_}||=
'' }
          sort keys %$attrs;

      $xml =3D " $xml"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transaction_new.yml
Type: application/octet-stream
Size: 632 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20080827/8=
df3bb53/transaction_new.obj


More information about the HTML-FormFu mailing list