Skip to content
Snippets Groups Projects
Commit 6af4f069 authored by Robert Anderson's avatar Robert Anderson
Browse files

* Added niceUndef function to print undefined strings nicely

parent 5a9a3661
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,27 @@ require Exporter;
our (@ISA,@EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(
niceUndef
templateReplace
);
## @fn niceUndef($string)
# If string defined return 'string', or if undefined return -undef-
#
# @param string String to check
#
# @return Return 'string' if defined, or -undef- otherwise
sub niceUndef
{
my $string = shift;
return defined($string) ? "'$string'" : '-undef-';
}
## @fn templateReplace($string,$hashref)
# Template string replacer function
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment