diff options
author | Oliver Tappe | 2007-04-15 13:34:55 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-04-15 13:34:55 +0200 |
commit | 3ddba26c76ce8a328607ded5eede4af046489cb4 (patch) | |
tree | ff4cc18886cd1b1ee74fb80c6916444fa930dc85 /lib/OpenSLX/Basics.pm | |
parent | * improved installer such that it can continue in case the basic system had b... (diff) | |
download | core-3ddba26c76ce8a328607ded5eede4af046489cb4.tar.gz core-3ddba26c76ce8a328607ded5eede4af046489cb4.tar.xz core-3ddba26c76ce8a328607ded5eede4af046489cb4.zip |
* added our implementation of warn() to increase the visibility of warnings.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@893 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib/OpenSLX/Basics.pm')
-rw-r--r-- | lib/OpenSLX/Basics.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm index abcb7aa2..95a67dd0 100644 --- a/lib/OpenSLX/Basics.pm +++ b/lib/OpenSLX/Basics.pm @@ -23,7 +23,7 @@ $VERSION = 1.01; @EXPORT = qw( &openslxInit %openslxConfig %cmdlineConfig &_tr &trInit - &die &executeInSubprocess &slxsystem + &warn &die &executeInSubprocess &slxsystem &vlog ); @@ -320,6 +320,20 @@ sub slxsystem } # ------------------------------------------------------------------------------ +sub warn +{ + my $msg = shift; + if ($openslxConfig{'croak'}) { + print STDERR "*** "; + carp $msg; + } else { + $msg =~ s[^][*** ]igms; + chomp $msg; + print STDERR "$msg\n"; + } +} + +# ------------------------------------------------------------------------------ sub die { my $msg = shift; |