diff options
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; |