From: b Date: Sat, 30 Dec 2023 12:01:16 +0000 (+0000) Subject: default path separator fallback X-Git-Tag: v1.0.25 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=3231e70f7ba581a5ac018ca4ec2e5f9db100a19a;p=botm%2Fcommon-perl default path separator fallback --- diff --git a/botm_common.pm b/botm_common.pm index e3f4c83..1bdac0c 100644 --- a/botm_common.pm +++ b/botm_common.pm @@ -25,7 +25,7 @@ use Encode ('encode', 'decode'); use Exporter; -our $VERSION = '1.0.24'; +our $VERSION = '1.0.25'; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = ( @@ -44,9 +44,12 @@ our @EXPORT_OK = ( # path stuff # join_path() builds a path (or url) from individual segments -# that there will be 1 path separator brtween (and not 2 or 0). +# that there will be 1 path separator between (and not 2 or 0). sub join_path { (my $joiner, my @segments) = @_; + if ($joiner eq '') { + $joiner = '/'; + } my $path = ''; foreach my $segment (@segments) {