Thursday, February 05, 2009

Configure Module::Starter::PBP in Windows XP

I decided to use Module::Starter::PBP when creating modules. But I got this error the first time:

C:\dev\perl\modules>module-starter --module=Dir::Walk
The Module::Starter::PBP template: t/C:./Documents isn't in the template directory (C:\Documents and Settings\user\.module-starter\PBP)
Some quirky stuffs in Windows when using this module. The initial configuration as outlined in cpan doesn't work. You need to tweak your config a little bit to accomodate this. It's not really the module's fault, but more on the way Windows handles directories, you know, spaces and backslashes, which is really a constant annoyance when you are programming perl in Windows. Anyway, here's what I did to make it work.

1. Move C:\Documents and Settings\user\.module-starter\PBP to another directory, in my case I moved it to C:\dev\perl\modules\templates\PBP.
(It's the spaces in 'Documents and Settings' that's causing the issue).

2. Modify C:\Documents and Settings\user\.module-starter\config as follows: (Note that I changed the backslashes to forwardslashes).

author: Sam Dela Cruz
builder: ExtUtils::MakeMaker Module::Build
plugins: Module::Starter::PBP
template_dir: C:/dev/perl/modules/templates/PBP