Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how to call perl-cgi from another perl-cgi?

by izut (Chaplain)
on Nov 07, 2006 at 10:41 UTC ( [id://582606]=note: print w/replies, xml ) Need Help??


in reply to how to call perl-cgi from another perl-cgi?

Maybe you want to be more specific about your need. You might want to create a module for the code contained in your perl2.cgi file. Something like that (untested):

MyModule.pm:

package MyModule; sub something { my ($param) = @_; # do something here } 1;

perl1.cgi:

use MyModule; use CGI; # process something here... my $result = process_something_here(); MyModule::something($result);

perl2.cgi

use MyModule; use CGI; # process other thing here... my $result = process_other_thing_here(); MyModule::something($result);

Maybe you have to think about your problem. Maybe you want to share a specific part of your perl2.cgi file. If you want that, create a module (perlmodlib) and share that. It is better than glueing a lot of CGI's together.

Hope that helps.

Igor 'izut' Sutton
your code, your rules.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://582606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-19 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found