[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.3, Mon Aug 3 21:31:42 2009 UTC revision 1.4, Tue Aug 4 18:19:59 2009 UTC
# Line 7  Line 7 
7      use YAML;      use YAML;
8      use ERDB;      use ERDB;
9      use TestUtils;      use TestUtils;
10        use DocUtils;
11      use Time::HiRes;      use Time::HiRes;
12      use ErrorDocument;      use ErrorDocument;
13      use CGI;      use CGI;
# Line 51  Line 52 
52          Tracer::TraceParms($cgi);          Tracer::TraceParms($cgi);
53      }      }
54      Trace("Running $serverName server request.") if T(3);      Trace("Running $serverName server request.") if T(3);
55      # Get the function name.      # Is this a documentation request?
56        my $module = $cgi->param('pod');
57        if ($module) {
58            # Here we have a documentation request. In this case, we produce POD HTML.
59            # Start the output page.
60            print CGI::header();
61            print CGI::start_html(-title => 'Documentation Page',
62                                  -style => { src => "$FIG_Config::cgi_url/Html/css/ERDB.css" });
63            # Protect from errors.
64            eval {
65                # We'll format the HTML text in here.
66                my $html = DocUtils::ShowPod($module, $cgi->url(-relative => 1) . "?pod=");
67                # Output the POD HTML.
68                print $html;
69            };
70            # Process any error.
71            if ($@) {
72                print CGI::blockquote({ class => 'error' }, $@);
73            }
74            # Close off the page.
75            print CGI::end_html();
76        } else {
77            # Here we have a function request. Get the function name.
78      my $function = $cgi->param('function') || "";      my $function = $cgi->param('function') || "";
79      Trace("Server function is $function.") if T(3);      Trace("Server function is $function.") if T(3);
80      # Insure the function name is valid.      # Insure the function name is valid.
# Line 111  Line 134 
134      print $cgi->header(-type => 'text/plain');      print $cgi->header(-type => 'text/plain');
135      print YAML::Dump($document);      print YAML::Dump($document);
136  }  }
137    }
138    
139  =head2 Utility Methods  =head2 Utility Methods
140    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3