Update of /cvsroot/sandweb/sandweb/lib
In directory usw-pr-cvs1:/tmp/cvs-serv25948/lib
Modified Files:
SandWeb.pm
Log Message:
* added return values to loading config files.
* sandweb will now error out if a config file does not exist.
* added $VERSION variable for build process.
* took out needless internal method
Index: SandWeb.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -U2 -r1.15 -r1.16
--- SandWeb.pm 18 Jan 2002 19:25:08 -0000 1.15
+++ SandWeb.pm 8 Mar 2002 06:58:30 -0000 1.16
@@ -8,4 +8,6 @@
use SandWeb::Auth;
+$VERSION = 'ALPHA';
+
# initiates the config class, and creates the other objects with its data
sub start_up {
@@ -13,5 +15,12 @@
# read in config file
- my $config = &_load_conf_object(@_); # pass args directly to conf_object
+ my $config = '';
+
+ $return = SandWeb::Config::->new(@_);
+ if ($return->{'errlev'}) {
+ $config = $return->{'data'};
+ } else {
+ return $return;
+ }
my $log = &_load_log_object('config' => $config);
@@ -19,5 +28,10 @@
my $auth = &_load_auth_object('config' => $config, 'log' => $log);
# create new conf object with log functionality
- $config = &_load_conf_object(@_, 'log_obj' => $log);
+ $return = SandWeb::Config::->new(@_, 'log_obj' => $log);
+ if ($return->{'errlev'}) {
+ $config = $return->{'data'};
+ } else {
+ return $return;
+ }
my $self = bless {
@@ -27,11 +41,7 @@
'auth' => $auth,
}, $class;
- return $self;
-}
-# read in config file, and return object reference to it's data.
-sub _load_conf_object {
- my $config = SandWeb::Config::->new(@_);
- return $config;
+ $return->{'data'} = $self;
+ return $return;
}
|