Changeset 7 in text-formbuilder for trunk/bin


Ignore:
Timestamp:
10/06/04 13:44:15 (20 years ago)
Author:
peter
Message:

removed dependecies on YAML and Parse::RecDescent
renamed _dump to dump; now only tries to load YAML if it is called; non-fatal error if YAML cannot be loaded
modified bin/fb-cgi.pl
expanded docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/fb-cgi.pl

    r1 r7  
    1212my $form = $parser->parse($src_file)->build(method => 'POST', params => $q)->form; 
    1313 
    14 if ($form->submitted && $form->validate) { 
    15     # TODO: 
     14if (1 or $form->submitted && $form->validate) { 
     15 
    1616    # call storage function 
     17 
    1718    my $plugin = 'DumpParams'; 
     19     
    1820    eval "use $plugin;"; 
    19      
    20     if ($plugin->process($q)) { 
     21    die "Can't use $plugin; $@" if $@; 
     22    die "Plugin $plugin doesn't know how to process" unless $plugin->can('process'); 
     23 
     24    # plugin process method should return a true value 
     25    if ($plugin->process($q, $form)) { 
    2126        # show thank you page 
    22         #print $q->header('text/plain'); 
    23         #print "Thank you for your input!\n" 
    2427    } else { 
    2528        # there was an error processing the results 
     29        die "There was an error processing the submission: " . $plugin->error; 
    2630    } 
    2731     
Note: See TracChangeset for help on using the changeset viewer.