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

Jump to

Quick reference

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.

Reloading mod_perl modules automatically when they change

Beware of using Apache::StatINC or Apache::Reload, especially is the module in question is a module acting as a configuration file. A severe shortage of fun can occur.

MySQL stored procedure gotchas

END and END IF statements must always end with a semicolon.

Debugging Perl DBI

You can set the tracelevel from 1-9 to see diagnostic messages in the logs!

Putting MySQL to sleep

Use

select sleep(30);

You can call this from a script and then run

show full processlist;

on the server to verify that the script is hitting it.