justone/dotfiles — pull request #15 by plobbes (2014-12-04 03:26:00+00:00)
Title: Dfm uninitialized warnings due to usage of Cwd::realpath

dfm can emit warnings like the following due to Cwd::realpath returning undef on paths containing spaces:

DEBUG: backups points at /my/path/Some Drive/dir
Use of uninitialized value $target_base in concatenation (.) or string at .../dotfiles/bin/dfm line 683.
DEBUG: target_base .../dotfiles
Use of uninitialized value $target_base in string eq at .../dotfiles/bin/dfm line 684.

This fix simply ensures $target_base is defined if we use/print it.

- example of Cwd::realpath returning undef:
$ perl -wl -MCwd -e 'my $p=Cwd::realpath(shift); print "p($p)";' "/path/has a/space"
Use of uninitialized value $p in concatenation (.) or string at -e line 1.
p()