Hi
This is what poj is talking about, three files, one module, and two cgi programs that use the module
$ cat MyCopyOrder.pm package MyCopyOrder; sub cgi_run { my $q = CGI->new; my $refID = $q->param('refID'); my $data = MakeData( $refID ); print $q->header, $data; return; } sub MakeData { my( $id ) = @_; ... return $doc; } $ cat copyorders_multiple.pl #!/usr/bin/perl -- use strict; use warnings; use lib '/home/home/mylibs'; ## if needed use MyCopyOrder; MyCopyOrder::cgi_run( ); exit 0; $ cat used_to_call_copyorders_multiple.pl #!/usr/bin/perl -- use strict; use warnings; #~ use HTTP::Lite; #~ my $http = new HTTP::Lite; #~ my $req = $http->request("copyorders_multiple.pl?refID=".&trim($lic +ense)) or die "Unable to get document: $!"; #~ my $data = $http->body(); #~ if (length(&trim($data)) > 0) use lib '/home/home/mylibs'; ## if needed use MyCopyOrder; my $data = MyCopyOrder::MakeData( $license ); ...
In reply to Re^3: replace use HTTP::Lite to run a perl file that was on another server
by beech
in thread replace use HTTP::Lite to run a perl file that was on another server
by bNathan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |