[Bio] / FigKernelPackages / ServerThing.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/ServerThing.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Tue Aug 4 18:19:59 2009 UTC revision 1.5, Tue Aug 4 18:41:56 2009 UTC
# Line 15  Line 15 
15  =head1 General Server Helper  =head1 General Server Helper
16    
17  This package provides a method-- I<RunServer>-- that can be called from a CGI  This package provides a method-- I<RunServer>-- that can be called from a CGI
18  script to perform the duties of a FIG server. RunServer is called with two  script to perform the duties of a FIG server. RunServer is called with three
19  parameters: the name of the server package (e.g. C<SAP> for B<SAP.pm>) and  parameters: the name of the server package (e.g. C<SAP> for B<SAP.pm>),
20  the first command-line parameter. This last is only used when the server  the first command-line parameter, and the URL prefix to use for the documentation.
21  script is being invoked from the debugging console.  The command-line parameter (if defined) will be used as the tracing key, and is
22    used to indicate that the script is being invoked from the command line rather
23    than over the web.
24    
25  =cut  =cut
26    
27  sub RunServer {  sub RunServer {
28      # Get the parameters.      # Get the parameters.
29      my ($serverName, $key) = @_;      my ($serverName, $key, $docURL) = @_;
30      # Get the CGI parameters.      # Get the CGI parameters.
31      my $cgi;      my $cgi;
32      if (! $key) {      if (! $key) {
# Line 63  Line 65 
65          # Protect from errors.          # Protect from errors.
66          eval {          eval {
67              # We'll format the HTML text in here.              # We'll format the HTML text in here.
68              my $html = DocUtils::ShowPod($module, $cgi->url(-relative => 1) . "?pod=");              my $html = DocUtils::ShowPod($module, $docURL);
69              # Output the POD HTML.              # Output the POD HTML.
70              print $html;              print $html;
71          };          };

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3