summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig
diff options
context:
space:
mode:
authorOliver Tappe2007-07-01 22:28:50 +0200
committerOliver Tappe2007-07-01 22:28:50 +0200
commit6974fa8b0419bbd0711f79c8b78e07a9543810dd (patch)
tree25141f0f4d20ca8fdb1c845edf5b9ce4b24a6e98 /config-db/slxconfig
parentTried to add Ubuntu 7.04 to the list of cloneable systems. (diff)
downloadcore-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.gz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.xz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.zip
* activated 'use warnings' to all modules and adjusted all occurences of
'use of uninitialized values', a couple of which might still show up * adjusted all code with respect to passing perlcritic level 4 and 5 git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1207 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig')
-rwxr-xr-xconfig-db/slxconfig11
1 files changed, 6 insertions, 5 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig
index cb6c912e..07ff6473 100755
--- a/config-db/slxconfig
+++ b/config-db/slxconfig
@@ -11,6 +11,7 @@
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
use strict;
+use warnings;
my $abstract = q[
slxconfig
@@ -143,7 +144,7 @@ sub dumpElements
'',
map {
my $spc = ' 'x25;
- my $val = $elem->{$_};
+ my $val = $elem->{$_} || '';
$val =~ s[\n][\n\t$spc ]g;
"\t$_"
.substr($spc, length($_))
@@ -319,12 +320,12 @@ sub addSystemToConfigDB
my $systemData = parseKeyValueArgs(\@systemKeys, 'system', @_);
$systemData->{name} = $systemName;
- if (!length($systemData->{export})) {
- $systemData->{export} = $systemName;
+ my $exportName = $systemData->{export} || '';
+ delete $systemData->{export};
+ if (!length($exportName)) {
+ $exportName = $systemName;
# try falling back to given system name
}
- my $exportName = $systemData->{export};
- delete $systemData->{export};
my $export
= $openslxDB->fetchExportByFilter({ 'name' => $exportName });
if (!defined $export) {