hesco has asked for the wisdom of the Perl Monks concerning the following question:

Reading my apache logs, I'm getting lots of errors reading:

[FormBuilder] Warning: Possible field access via $form->weaken() - see + 'fieldsubs' option at /usr/local/share/perl/5.8.8/My/Latest/Project/ +WWW.pm line 923,
This is a module which has been working on the development server and is now being installed for the first time on a new server. I've never seen that error on the previous installation. And grep'ing through the CGI::FormBuilder code did not reveal anything. Following line numbers says every one of these errors was thrown by an invocation to the $form-> field() method. Here is a typical one.

$form->field( name => $fieldset . '_spoke_w_this_person', label => 'Spoke with this Person', fieldset => $fieldset, type => "checkbox", options => [qw(Yes)], comment => '<br>You must mark this checkbox, <br>to record thi +s data in the database', );
So my question is: What does this "$form->weaken()" error mean and how do I clean it out of my logs?

-- Hugh

Update:

Thank you to the Anonymous Monk who pointed me to the idea of adding 'fieldsubs => 0 | 1' to my constructor. That seems to have done the trick. And thank you Grandfather for your generosity as well. My logs are nearly clean again, with the help of fine Monks such as yourself.

if( $lal && $lol ) { $life++; }

Replies are listed 'Best First'.
Re: puzzled by CGI::FormBuilder (?) errors?
by GrandFather (Saint) on Oct 08, 2008 at 04:28 UTC

    Check that you are using the same module versions both places. Quite likely the "new server" has an older version of FormBuilder or something FormBuilder depends on.


    Perl reduces RSI - it saves typing
      Here is some evidence:

      Using locate on the new server shows a /root/.cpan/build/CGI-FormBuilder-3.0501 directory, but the other server does not. They are both the same version, to believe the version numbers, but apparently the old server was installed from apt-get and the new server was installed from cpan.

      -- Hugh

      if( $lal && $lol ) { $life++; }
Re^2: puzzled by CGI::FormBuilder (?) errors?
by Anonymous Monk on Oct 08, 2008 at 04:43 UTC