Subject: | Windows support |
Date: | Mon, 19 Oct 2015 17:35:45 -0600 |
To: | bug-Text-Todo [...] rt.cpan.org |
From: | James Brown <james [...] hmpg.net> |
I use activestate Perl on windows. Unless you explicitly create it,
there is no $ENV{HOME} value. So, for windows I did the following
instead (about line 21):
use File::Basename;
# option defaults
my $HOME = $ENV{HOME} || dirname($0);
my $config_file = $HOME . '/todo.cfg';
CONFIG: foreach my $f ( $config_file, $HOME . '/.todo.cfg', ) {
This causes the tool to look for a home environment variable but if it
does not exist, it uses the directory from which the script was loaded.
This is usually where your config file is as well.
I then had to change the following two lines (config stuff) because they
also explicitly looked for $ENV{HOME}. I just replaced those variables
with the $HOME I created above.
Everything else works correctly under windows now.
Thanks,
- James