diff options
author | Oliver Tappe | 2007-07-01 22:28:50 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-07-01 22:28:50 +0200 |
commit | 6974fa8b0419bbd0711f79c8b78e07a9543810dd (patch) | |
tree | 25141f0f4d20ca8fdb1c845edf5b9ce4b24a6e98 /bin/slxldd | |
parent | Tried to add Ubuntu 7.04 to the list of cloneable systems. (diff) | |
download | core-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 'bin/slxldd')
-rwxr-xr-x | bin/slxldd | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -14,6 +14,7 @@ # - OpenSLX-rewrite of ldd that works on multiple architectures. # ----------------------------------------------------------------------------- use strict; +use warnings; my $abstract = q[ slxldd @@ -25,14 +26,14 @@ slxldd required by a binary of the x86_64 target system. ]; -use File::Glob ':globally'; -use Getopt::Long; -use Pod::Usage; - # add the lib-folder to perl's search path for modules: use FindBin; use lib "$FindBin::RealBin/../lib"; +use File::Glob ':globally'; +use Getopt::Long; +use Pod::Usage; + use OpenSLX::Basics; my ( @@ -104,8 +105,10 @@ sub fetchLoaderConfigFile { my $ldConfFile = shift; - open(LDCONF, "< $ldConfFile"); - while (<LDCONF>) { + my $ldconfFH; + open($ldconfFH, '<', $ldConfFile) + or die(_tr("unable to open file '%s' (%s)", $ldConfFile, $!)); + while (<$ldconfFH>) { chomp; if (/^\s*include\s+(.+?)\s*$/i) { foreach my $incFile (<$rootPath$1>) { @@ -119,7 +122,8 @@ sub fetchLoaderConfigFile push @libFolders, "$rootPath$_"; } } - close LDCONF; + close $ldconfFH + or die(_tr("unable to close file '%s' (%s)", $ldConfFile, $!)); } sub fetchLoaderConfig |