Changeset 9 in text-formbuilder for trunk/bin/fb-cgi.pl


Ignore:
Timestamp:
10/12/04 12:57:46 (20 years ago)
Author:
peter
Message:

added some simple tests
worked on CGI framework script

File:
1 edited

Legend:

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

    r7 r9  
    77my $q = CGI->new; 
    88 
    9 my $src_file = get_src_file($q->param('form_id')); 
     9my $form_id = $q->param('form_id'); 
     10my $src_file = get_src_file($form_id); 
    1011 
    1112my $parser = Text::FormBuilder->new; 
     
    1617    # call storage function 
    1718 
    18     my $plugin = 'DumpParams'; 
     19    my $plugin = 'StoreSQLite'; 
    1920     
    2021    eval "use $plugin;"; 
     
    2324 
    2425    # plugin process method should return a true value 
    25     if ($plugin->process($q, $form)) { 
     26    if ($plugin->process($q, $form, $form_id)) { 
    2627        # show thank you page 
    2728    } else { 
     
    3738sub get_src_file { 
    3839    my $form_id = shift; 
    39     return "$form_id.txt"; 
     40    my $form_spec_path = 'F:/Projects/SurveyMaker/form_specs'; 
     41    return "$form_spec_path/$form_id.txt"; 
    4042} 
Note: See TracChangeset for help on using the changeset viewer.