Subversion Repositories DevTools

Rev

Rev 5919 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5919 Rev 7539
Line 38... Line 38...
38
@ISA = qw(Exporter);
38
@ISA = qw(Exporter);
39
 
39
 
40
# Symbols to autoexport (:DEFAULT tag)
40
# Symbols to autoexport (:DEFAULT tag)
41
@EXPORT = qw(
41
@EXPORT = qw(
42
            connectRM
42
            connectRM
-
 
43
            connectDM
43
            disconnectRM
44
            disconnectRM
-
 
45
            disconnectDM
44
            );
46
            );
45
 
47
 
46
#
48
#
47
#   Globals to contain connection information
49
#   Globals to contain connection information
48
#
50
#
Line 122... Line 124...
122
{
124
{
123
    my ($gref, $opt_verbose) = @_;
125
    my ($gref, $opt_verbose) = @_;
124
    connectDB('connectRM', $gref, $opt_verbose, 'GBE_RM_LOCATION', 'GBE_RM_USERNAME', 'GBE_RM_PASSWORD');
126
    connectDB('connectRM', $gref, $opt_verbose, 'GBE_RM_LOCATION', 'GBE_RM_USERNAME', 'GBE_RM_PASSWORD');
125
}
127
}
126
 
128
 
-
 
129
sub connectDM
-
 
130
{
-
 
131
    my ($gref, $opt_verbose) = @_;
-
 
132
    connectDB('connectDM', $gref, $opt_verbose, 'GBE_DM_LOCATION', 'GBE_DM_USERNAME', 'GBE_DM_PASSWORD');
-
 
133
}
-
 
134
 
127
sub connectDB
135
sub connectDB
128
{
136
{
129
    my ($fname, $gref, $opt_verbose, @parms) = @_;
137
    my ($fname, $gref, $opt_verbose, @parms) = @_;
130
 
138
 
131
    #
139
    #
Line 168... Line 176...
168
sub disconnectRM
176
sub disconnectRM
169
{
177
{
170
    disconnectDB( 'disconnectRM', @_);
178
    disconnectDB( 'disconnectRM', @_);
171
}
179
}
172
 
180
 
-
 
181
sub disconnectDM
-
 
182
{
-
 
183
    disconnectDB( 'disconnectDM', @_);
-
 
184
}
-
 
185
 
173
sub disconnectDB
186
sub disconnectDB
174
{
187
{
175
    my ($fname, $gref) = @_;
188
    my ($fname, $gref) = @_;
176
 
189
 
177
    #
190
    #
Line 182... Line 195...
182
    ::Verbose("$fname: Disconnect from database");
195
    ::Verbose("$fname: Disconnect from database");
183
    if ( $$gref )
196
    if ( $$gref )
184
    {
197
    {
185
        $$gref->disconnect() || ::Warning ("$fname:Disconnect failed");
198
        $$gref->disconnect() || ::Warning ("$fname:Disconnect failed");
186
        $$gref = undef;
199
        $$gref = undef;
-
 
200
        ::Verbose("$fname: Disconnect from database complete");
187
    }
201
    }
188
    else
202
    else
189
    {
203
    {
190
        ::Warning("$fname: Connection not open");
204
        ::Warning("$fname: Connection not open");
191
    }
205
    }