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

Annotation of /FigKernelPackages/SSserver.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (view) (download) (as text)

1 : disz 1.1 package SSserver;
2 :    
3 : olson 1.4 #
4 : parrello 1.9 # This is a SAS Component
5 : olson 1.4 #
6 :    
7 : disz 1.1 use strict;
8 : parrello 1.15 use base qw(ClientThing);
9 : disz 1.1
10 : parrello 1.10 =head1 Subsystem Server Helper Object
11 :    
12 :     =head2 Description
13 :    
14 :     This module is used to call the Subsystem Server, which is a special-purpose
15 :     server for manipulating subsystem data from the Sapling database. Each Subsystem
16 :     Server function corresponds to a method of this object.
17 :    
18 :     This package deliberately uses no internal SEED packages or scripts, only common
19 :     PERL modules.
20 :    
21 :     The fields in this object are as follows.
22 :    
23 :     =over 4
24 :    
25 :     =item server_url
26 :    
27 :     The URL used to request data from the subsystem server.
28 :    
29 :     =item ua
30 :    
31 :     The user agent for communication with the server.
32 :    
33 :     =item singleton
34 :    
35 :     Indicates whether or not results are to be returned in singleton mode. In
36 :     singleton mode, if the return document is a hash reference with only one
37 :     entry, the entry value is returned rather than the hash.
38 :    
39 :     =back
40 :    
41 :     =cut
42 :    
43 :     =head3 new
44 :    
45 :     my $ss = SSserver->new(%options);
46 :    
47 : parrello 1.11 Construct a new server object. The
48 :     following options are supported.
49 : parrello 1.10
50 :     =over 4
51 :    
52 :     =item url
53 :    
54 : parrello 1.11 URL for the server. This option is required.
55 : parrello 1.10
56 : parrello 1.11 =item singleton (optional)
57 : parrello 1.10
58 :     If TRUE, results from methods will be returned in singleton mode. In singleton
59 :     mode, if a single result comes back, it will come back as a scalar rather than
60 :     as a hash value accessible via an incoming ID.
61 :    
62 :     =back
63 :    
64 :     =cut
65 :    
66 :     sub new {
67 :     # Get the parameters.
68 :     my ($class, %options) = @_;
69 : parrello 1.15 # Compute the URL.
70 :     $options{url} = 'http://servers.nmpdr.org/subsystem/server.cgi' if ! defined $options{url};
71 :     # Construct the subclass.
72 :     return $class->SUPER::new(SS => %options);
73 : parrello 1.11 }
74 :    
75 : parrello 1.10 1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3