That's why it's crucial, ... Also you can comment out anything you see fit. If the DBI parts aren't what you're debugging, you too can omit that portion from your question :)
Some call it cleaning your room, but it is basic debugging, even for CGI/for CGI
Ok, trying that
#!/usr/bin/perl --
use strict; use warnings;
use CGI::FormBuilder;
{
my $env_choose = CGI::FormBuilder->new(
fields => [qw(env_type env_state)],
header => 1,
method => 'post',
keepextras => 1,
);
if ($env_choose->submitted) {
print $env_choose->confirm;
}
}
But this oddly produces NO OUTPUT
$ perl fbhuh
$ perl fbhuh env_type=something env_state=something EXTRA=STUFF
Hmm, it doesn't die, it just produces no output
Hmm, only one print statement in a conditional , what happens if $env_choose->submitted is false?
Add code else {
print $env_choose->render;
}
Run it $ perl fbhuh env_type=something env_state=something EXTRA=STUFF
and it outputs something
And run it again, this time simulating submitting of the form $ perl fbhuh env_type=something env_state=something EXTRA=STUFF _submitted=1
Oh look, it printed the confirmation screen
So it looks to me like you're not following the usage pattern closely enough if( $form->... ){ print $form... } else { print $form ... } |