[Bio] / Sprout / ERDBExtras.pm Repository:
ViewVC logotype

Annotation of /Sprout/ERDBExtras.pm

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : parrello 1.1 #!/usr/bin/perl -w
2 :     use strict;
3 :     use FIG_Config;
4 :     no warnings qw(once);
5 :    
6 :     package ERDBExtras;
7 :    
8 :     =head1 ERDB Extras
9 :    
10 :     =head2 Introduction
11 :    
12 :     This module contains parameter declarations used by the ERDB system.
13 :    
14 :     A package called B<FIG_Config> must be somewhere in the PERL path. Parameters
15 :     that vary from server to server should go in there. Parameters common to the
16 :     entire installation should go in here. Note that if B<FIG_Config> is empty,
17 :     everything will still work.
18 :    
19 :     =cut
20 :    
21 :     =head2 Configuration Values
22 :    
23 :     =head3 customERDBtypes
24 :    
25 :     C<$ERDBExtras::customERDBtypes> contains a list of the custom ERDB types associated
26 :     with the current code base. This replaces the old B<FIG_Config> variable of the
27 :     same name. When a new custom type is created, it should be put in this list.
28 :    
29 :     =cut
30 :    
31 :     our $customERDBtypes = [qw(ERDBTypeDNA ERDBTypeLink ERDBTypeImage
32 :     ERDBTypeLongString ERDBTypeSemiBoolean
33 : parrello 1.6 ERDBTypeRectangle ERDBTypeCountVector
34 :     ERDBTypeProteinData)];
35 : parrello 1.1
36 :     =head3 sort_options
37 :    
38 :     C<$ERDBExtras::sort_options> specifies the options to be used when performing a
39 :     sort during a database load. So, for example, if the host machine has a lot of
40 :     memory, you can specify a value for the C<-S> option to increase the size of the
41 :     sort buffer.
42 :    
43 :     =cut
44 :    
45 :     our $sort_options = $FIG_Config::sort_options || "";
46 :    
47 :     =head3 temp
48 :    
49 :     C<$ERDBExtras::temp> specifies the name of the directory to be used for
50 :     temporary files. It should be a location that is writable and accessible
51 :     from the web, because it is used to store images (see L</temp_url>).
52 :    
53 :     =cut
54 :    
55 :     our $temp = $FIG_Config::temp || "/tmp";
56 :    
57 :     =head3 temp_url
58 :    
59 :     C<$ERDBExtras::temp_url> must be the URL that can be used to find the temporary
60 :     directory from the web (see L</temp>).
61 :    
62 :     =cut
63 :    
64 :     our $temp_url = $FIG_Config::temp_url || "/tmp";
65 :    
66 :     =head3 delete_limit
67 :    
68 :     C<$ERDBExtras::delete_limit> specifies the maximum number of database rows that should
69 :     be deleted at a time. If a non-zero value is specified, SQL deletes will be
70 :     limited to the specified size. Use this parameter if large deletes are locking
71 :     the database server for unacceptable periods.
72 :    
73 :     =cut
74 :    
75 :     our $delete_limit = 0;
76 :    
77 :     =head3 cgi_url
78 :    
79 :     C<$ERDBExtras::cgi_url> specifies the URL of the CGI directory containing the
80 :     ERDB web scripts.
81 :    
82 :     =cut
83 :    
84 :     our $cgi_url = $FIG_Config::cgi_url || "/cgi-bin";
85 :    
86 :     =head3 diagram_url
87 :    
88 :     C<$ERDBExtras::diagramURL> specifies the URL of the ERDB diagramming engine.
89 :     This is a compiled flash movie file (SWF) used for the documentation widget.
90 :    
91 :     =cut
92 :    
93 : parrello 1.2 our $diagramURL = $FIG_Config::diagramURL || "$cgi_url/Html/Diagrammer.swf";
94 : parrello 1.1
95 :     =head3 query_limit
96 :    
97 :     C<$ERDBExtras::query_limit> specifies the maximum number of rows that can be
98 :     returned by the query script if the user is not authorized. This is used
99 :     to prevent denial-of-service attackes against the query engine.
100 :    
101 :     =cut
102 :    
103 :     our $query_limit = 1000;
104 :    
105 :     =head3 css_dir
106 :    
107 :     C<$ERDBExtras::css_dir> specifies the directory containing the C<ERDB.css>
108 :     file.
109 :    
110 :     =cut
111 :    
112 :     our $css_dir = "$cgi_url/Html/css";
113 :    
114 :     =head3 js_dir
115 :    
116 :     C<$ERDBExtras::js_dir> specifies the directory containing the C<ERDB.js>
117 :     file.
118 :    
119 :     =cut
120 :    
121 :     our $js_dir = "$cgi_url/Html";
122 :    
123 : parrello 1.3 =head3 query_retries
124 :    
125 :     C<$ERDBExtras::query_retries> specifies the number of times a lost connection
126 :     should be retried when querying the database.
127 :    
128 :     =cut
129 :    
130 : parrello 1.4 our $query_retries = 1;
131 :    
132 :     =head3 sleep_time
133 :    
134 :     C<$ERDBExtras::sleep_time> specifies how many seconds to wait between database
135 :     reconnection attempts.
136 :    
137 :     =cut
138 :    
139 :     our $sleep_time = 10;
140 : parrello 1.3
141 : parrello 1.1 1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3