A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

is reserved

While attempting to read the filehandle that you think points to a file, you get this error:

Modification of a read-only value attempted

Maybe this means the script is reading from the inline __DATA__ section, and you're trying to write to it?

Make IMAP Gmail work on blackberry

If you enter your Google email address when prompted, there is no way to configure advanced settings to make IMAP accounts work. In fact, I called Orange and was told that their Blackberries do not support IMAP with Gmail, and it does not work.

But they are wrong. It does work - you need to enter an email address that is not one of the major commercial providers, but does host email accounts. I used a fake email alias @ a domain I know has a working mail record: siteaboutnothing.com

Then, as you follow the prompts, choose "Advanced settings" or similar, and you are able to set the server to imap.gmail.com and change the email address back to your gmail account.

I now have it set up so messages marked as read on my phone are sync'ed with my main gmail account and I don't have to manage two accounts at once.

Email output from the crontab

method 1 - for all commands

Add this as the first line of crontab:

MAILTO=address1@host.com,address2@host.co.uk

method 2 - for specific commands

Add this line anywhere near the top:

NOTIFY_LIST="address1@host.com,address2@host.co.uk"

Use this for the command:

00 09 * * * run_command | mail -s "command has run" $NOTIFY_LIST

Template Toolkit troubleshooting

If a module upon which your code is dependent does not compile, then Template Toolkit 2 under mod_perl 1.3 can give two misleading error messages:
  1. can't locate that module in the @INC path, although it is really there
  2. plugin error - load() returned a false value
The solution to both error messages is to syntax check all the dependent modules.