Writing a CPAN Bundle
I decided to take an hour out from my big project today to make my first CPAN Bundle for the PerlCertifiedHosting Project. Last year I posted to B&BPM asking how this was done as when I looked at bundles on CPAN I couldn't see anything special. David Cantrell was good enough to respond, pointing me to:-
http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Bundles
Which explains it. I was looking for some special code or something, when after all it's just a list of modules in the contents section.
First draft:-
How to submit Perl patches?
It's about time I learnt to submit proper patches. In the past I've just emailed module authors spelling mistakes and code fixes. This isn't good for the authors as then they have to scan through and manually edit the modules themselves. Thus making it more time consuming for them, and less likely for them to apply your fix. The proper way to do with is by supplying a diff which can be patched into the module. I've been sending lots of typo fixes to Mark Stosberg recently as I've been reading up on CGI::Application. I've promised him the next ones I send will be proper patches. Although as it turns out, my first patch wont be for CGI::App typos.
This post is a continuation of my last post, which you'll need to follow for the example to work.
Let's go through the process for the bug I found in the CGI::Kwiki test suite when ran under Windows.
First let look at the current test file (C:\temp\CGI-Kwiki-0.18\t\test.t):-
Building perl modules from source on windows
This guide is to cover building and installing Pure Perl modules on Windows for use with ActivePerl. It doesn't cover XS Perl modules that use C libraries. I'll leave that for another post :)
You'll want UnxUtils from sourceforge and nmake from Microsoft. If you haven't already installed these, follow these steps:-
Useful Firefox search hack
I read of a really useful Firefox hack the other day which I've been
using an awful lot since. It's saved me a lot of time, but I can't for
the life of me remember where I read about it... I'm sure it was a book
review or something? :-\
Anyway, in Firefox do:-
Bookmarks->Organise Bookmarks
Then click on 'Bookmarks Menu', right click on the right pane and select
'New Bookmark'.
Call it 'CPAN search', put the location as
'http://search.cpan.org/search?query=%s&mode=all' and most importantly
set the keyword to 'cpan' (This is why we're adding through Organise
Bookmarks rather than just add bookmark).
Now you can easily search cpan. Just type 'cpan MODULE' in the address bar.
You can of course use this same hack for any number of sites that have
the search term in the query string.
Lyle
Packaging CPAN modules from Windows in Linux Style
You're a CPAN author, but against the trend you develop on Windows rather than Linux.
This is fine, helps a lot with your modules cross platform compatibility, but when you come to package your modules for CPAN you hit a snag. Windows doesn't have tar or gzip, or even make... You can get nmake as a download from Microsoft, you could use .zip rather than .tar.gz, but this isn't going to make the Linux buffs very happy.
The solution is pretty simple, luckily there is a package called UnxUtils (yes no i in Unx) available on sourceforge. This has Win32 ports of gzip, tar and make. Although you'll still need nmake from Microsoft as you'll find make won't read windows paths properly.
Here is a quick step by step:-