paulroub / todo.txt-recurring-tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

standalone script fails

licquia opened this issue · comments

There are two problems (at least) with the standalone script as distributed here.

First, I suspect most systems don't put the perl executable in /opt/local/bin. Perhaps something like this would work better as the first line:

!/usr/bin/env perl

Second, after modifying the script's first line to point to the proper perl executable, I get this error:

Can't locate PAR/Heavy.pm in @inc (@inc contains: CODE(0x1fb9b68) /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /opt/local/bin/par.pl line 348.

I ended up rebuilding recur, and once that was done, everything worked OK on the machine I built it on. But I share my todotxt info on multiple machines, and running it on another machine caused the same error. I ended up having to install the PAR::Heavy module on my other systems before it would work.

FWIW, I observed this problem on both Ubuntu 11.10 (oneiric) and a prerelease of Ubuntu 12.04 (precise). In both cases, I installed the PAR modules via apt-get instead of via CPAN.

Made the perl-path change; that was an artifact of packaging things on my Mac.

The PAR stuff has to go. I was trying to avoid forcing a perl-module install of this package, but obviously it's worse this way.

See the package-module branch - there's a first stab at a properly-package Perl module, with the recur script set to install to the correct todo.sh filters location. See the README for instructions if your filters are in a non-standard location.

I've switched to the package-module branch, and for the most part, everything seems to be OK. There was a warning about the README being missing at "perl Makefile.PL". Also, it might be worth noting int he docs that the Test::Class module needs to be installed for the tests to work.

But after the "sudo make install" step, the addon seems to be working as advertised; it prints help output as part of todo.sh --help, and todo.sh recur seems to do nothing (which it should; no tasks are scheduled for today). I'll follow up if it fails when it's time for tasks to be added, but for now, I think you can assume that things are working for me.

Corrected the bogus missing file notice, and noted the class requirements. Thanks.