in reply to Re: cgi page calling another cgi when submitting form but does not returns error only to web server log and not to browser.
in thread cgi page calling another cgi when submitting form but does not returns error only to web server log and not to browser.

If I have to pass the form data to this perl module , How should I be doing it.

Should i pass the "param" from cgi to this module and split it using split function ?

  • Comment on Re^2: cgi page calling another cgi when submitting form but does not returns error only to web server log and not to browser.

Replies are listed 'Best First'.
Re^3: cgi page calling another cgi when submitting form but does not returns error only to web server log and not to browser.
by Anonymous Monk on Jul 01, 2014 at 16:49 UTC
      So for commandline version you might have
      ... use MyModuule; MyModuule::DoTheCLIDance( @ARGV ); exit( 0 );

      where

      sub MyModuule::DoTheCLIDance { my %args = GetOptMyArgsIWant(\@_); my $query = CGI->new( %args ); ## FORMDATA my( $headers, $body ) = DoTheDance( $query ); print $body; ## no headers on CLI :) }

      and the other cgi

      sub MyModuule::DoTheCgiDanceOTHER { my $query = CGI->new; my( $headers, $body ) = PutOnSomePants( $query ); print $headers, $body; } sub MyModuule::DoTheCLIDanceOTHER { ## no advanced getopt stuff ## just key value key value key value my $query = CGI->new( @_ ); my( $headers, $body ) = PutOnSomePants( $query ); print $body; }

      The idea is each .cgi or .pl, uses some modules and calls calls one subroutine to take care of everything