diff options
author | Oliver Tappe | 2007-05-13 21:01:39 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-05-13 21:01:39 +0200 |
commit | 20ec9098cb5fc91e79fc5e4c4a161dc211f91983 (patch) | |
tree | 11eb953f16c599d1fbd76e467bef9fe816416d3d /config-db | |
parent | * added empty outlines for Debian-3.1 and Debian-4.0 to repository (diff) | |
download | core-20ec9098cb5fc91e79fc5e4c4a161dc211f91983.tar.gz core-20ec9098cb5fc91e79fc5e4c4a161dc211f91983.tar.xz core-20ec9098cb5fc91e79fc5e4c4a161dc211f91983.zip |
* simplified declaration of base classes via 'use base'
* simplified checking for correct API-version of modules
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1072 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r-- | config-db/OpenSLX/MetaDB/Base.pm | 2 | ||||
-rw-r--r-- | config-db/OpenSLX/MetaDB/CSV.pm | 9 | ||||
-rw-r--r-- | config-db/OpenSLX/MetaDB/DBI.pm | 9 | ||||
-rw-r--r-- | config-db/OpenSLX/MetaDB/SQLite.pm | 10 | ||||
-rw-r--r-- | config-db/OpenSLX/MetaDB/mysql.pm | 10 |
5 files changed, 12 insertions, 28 deletions
diff --git a/config-db/OpenSLX/MetaDB/Base.pm b/config-db/OpenSLX/MetaDB/Base.pm index ac15ac52..db1f2e7e 100644 --- a/config-db/OpenSLX/MetaDB/Base.pm +++ b/config-db/OpenSLX/MetaDB/Base.pm @@ -16,7 +16,7 @@ package OpenSLX::MetaDB::Base; use strict; use vars qw($VERSION); -$VERSION = 1; # API-version +$VERSION = 1.01; # API-version . implementation-version use Carp; diff --git a/config-db/OpenSLX/MetaDB/CSV.pm b/config-db/OpenSLX/MetaDB/CSV.pm index 9d1418f4..94335d25 100644 --- a/config-db/OpenSLX/MetaDB/CSV.pm +++ b/config-db/OpenSLX/MetaDB/CSV.pm @@ -13,8 +13,9 @@ # ----------------------------------------------------------------------------- package OpenSLX::MetaDB::CSV; +use strict; use vars qw($VERSION); -$VERSION = 1; # API-version +$VERSION = 1.01; # API-version . implementation-version use base qw(OpenSLX::MetaDB::DBI); ################################################################################ @@ -28,12 +29,8 @@ use Carp; use Fcntl qw(:DEFAULT :flock); use DBD::CSV 0.22; use OpenSLX::Basics; +use OpenSLX::MetaDB::DBI 1; -my $superVersion = $OpenSLX::MetaDB::DBI::VERSION; -if ($superVersion < $VERSION) { - confess _tr("Unable to load module '%s' (Version '%s' required, but '%s' found)", - 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion); -} ################################################################################ ### implementation ################################################################################ diff --git a/config-db/OpenSLX/MetaDB/DBI.pm b/config-db/OpenSLX/MetaDB/DBI.pm index 31f70350..e59c9996 100644 --- a/config-db/OpenSLX/MetaDB/DBI.pm +++ b/config-db/OpenSLX/MetaDB/DBI.pm @@ -15,18 +15,13 @@ package OpenSLX::MetaDB::DBI; use strict; use vars qw($VERSION); -$VERSION = 1; # API-version +$VERSION = 1.01; # API-version . implementation-version use base qw(OpenSLX::MetaDB::Base); use Carp; use DBI; use OpenSLX::Basics; - -my $superVersion = $OpenSLX::MetaDB::Base::VERSION; -if ($superVersion < $VERSION) { - confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)', - 'OpenSLX::MetaDB::Base', $VERSION, $superVersion); -} +use OpenSLX::MetaDB::Base 1; ################################################################################ ### basics diff --git a/config-db/OpenSLX/MetaDB/SQLite.pm b/config-db/OpenSLX/MetaDB/SQLite.pm index 673ae1c0..147b2061 100644 --- a/config-db/OpenSLX/MetaDB/SQLite.pm +++ b/config-db/OpenSLX/MetaDB/SQLite.pm @@ -13,8 +13,9 @@ # ----------------------------------------------------------------------------- package OpenSLX::MetaDB::SQLite; +use strict; use vars qw($VERSION); -$VERSION = 1; # API-version +$VERSION = 1.01; # API-version . implementation-version use base qw(OpenSLX::MetaDB::DBI); ################################################################################ @@ -25,12 +26,7 @@ use strict; use Carp; use DBD::SQLite; use OpenSLX::Basics; - -my $superVersion = $OpenSLX::MetaDB::DBI::VERSION; -if ($superVersion < $VERSION) { - confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)', - 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion); -} +use OpenSLX::MetaDB::DBI 1; ################################################################################ ### implementation diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm index 2d0c15d9..231e1bda 100644 --- a/config-db/OpenSLX/MetaDB/mysql.pm +++ b/config-db/OpenSLX/MetaDB/mysql.pm @@ -13,8 +13,9 @@ # ----------------------------------------------------------------------------- package OpenSLX::MetaDB::mysql; +use strict; use vars qw($VERSION); -$VERSION = 1; # API-version +$VERSION = 1.01; # API-version . implementation-version use base qw(OpenSLX::MetaDB::DBI); ################################################################################ @@ -25,12 +26,7 @@ use strict; use Carp; use DBD::mysql; use OpenSLX::Basics; - -my $superVersion = $OpenSLX::MetaDB::DBI::VERSION; -if ($superVersion < $VERSION) { - confess _tr('Unable to load module <%s> (Version <%s> required, but <%s> found)', - 'OpenSLX::MetaDB::DBI', $VERSION, $superVersion); -} +use OpenSLX::MetaDB::DBI 1; ################################################################################ ### implementation |