[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.1, Tue Jun 16 16:37:23 2009 UTC revision 1.2, Tue Jun 30 20:11:54 2009 UTC
# Line 15  Line 15 
15    
16  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
17  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 two
18  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>) and
19  the first command-line parameter. This last is only used when the server  the first command-line parameter. This last is only used when the server
20  script is being invoked from the debugging console.  script is being invoked from the debugging console.
21    
# Line 44  Line 44 
44      # Get the function name.      # Get the function name.
45      my $function = $cgi->param('function') || "";      my $function = $cgi->param('function') || "";
46      Trace("Server function is $function.") if T(3);      Trace("Server function is $function.") if T(3);
47        # Insure the function name is valid.
48        Die("Invalid function name.")
49            if $function =~ /\W/;
50      # The parameter structure will go in here.      # The parameter structure will go in here.
51      my $args;      my $args;
52      # Start the timer.      # Start the timer.
# Line 95  Line 98 
98      my $duration = int(time() - $start + 0.5);      my $duration = int(time() - $start + 0.5);
99      Trace("Function executed in $duration seconds.") if T(2);      Trace("Function executed in $duration seconds.") if T(2);
100      # Output the YAML.      # Output the YAML.
101      print $cgi->header(-type => 'text/yaml');      print $cgi->header(-type => 'text/plain');
102      print YAML::Dump($document);      print YAML::Dump($document);
103  }  }
104    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3