Skip Menu |

This queue is for tickets about the Text-Todo CPAN distribution.

Report information
The Basics
Id: 107868
Status: open
Priority: 0/
Queue: Text-Todo

People
Owner: andrew [...] cpan.org
Requestors: james [...] hmpg.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On 2015-10-19 16:35:57, james@hmpg.net wrote: Show quoted text
> I use activestate Perl on windows. Unless you explicitly create it, > there is no $ENV{HOME} value.
File::HomeDir also exists in core as a cross-platform solution.
On Mon Oct 19 19:35:57 2015, james@hmpg.net wrote: Show quoted text
> 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):
I keep thinking about this and am still not quite sure how I'm going to resolve it. I was excited about File::HomeDir, but it's not as core as I was led to believe so I keep putting off making a decision on whether I want to add a dependency or do something else. $ perl -MFile::HomeDir -e 1 Can't locate File/HomeDir.pm in @INC (you may need to install the File::HomeDir module) (@INC contains: /usr/local/libdata/perl5/site_perl/alpha-openbsd /usr/libdata/perl5/site_perl/alpha-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/libdata/perl5/alpha-openbsd/5.20.2 /usr/local/libdata/perl5/alpha-openbsd/5.20.2 /usr/libdata/perl5 /usr/local/libdata/perl5 .). BEGIN failed--compilation aborted.