Installing the Perl Technorati API implementation WebService::Technorati on OSX via CPAN

This will be yet another entertaining dive into installing software on OSX.

For today’s task, I want to install the Perl WebService::Technorati API interface to the Technorati blog search / aggregation site. Usually, I do something like $ perl -MCPAN -e shell to get a CPAN shell, and then install WebService::Technorati and hit “yes” when asked about following references. This time, things failed because one of the requirements, XML::Parser, needs to have the XML parser Expat installed. I do have Expat installed – twice even, once from the Apple X11 extra install stuff, and once via the OSX packaging project fink – but CPAN couldn’t pick either of those up since they aren’t in the most obvious of places.

So it looks like I’ll need to install XML::Parser myself. Since CPAN went to all the trouble to download the files that I need to do the install, I cd into the proper directory (have to spawn a root shell first since I’m installing in the system directories) cd ~/.cpan/build/XML-Parser-2.34-uwBcpV, then create a Makefile that actually points to the correct install: perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include, and then the magic incantation: make; make install. Since all that looked like it went well, I’ll drop back into user mode, sudo perl -MCPAN -e shell and re-try install WebService::Technorati.

That installed some XPATH tools, and then failed spectacularly with a missing LWP/UserAgent.pm, which is something I should probably have installed anyway. Installing LWP::UserAgent failed with a missing HTML::Tagset, which installed easily (isn’t CPAN supposed to chase down these dependencies for me? Usually it does, but today CPAN is really having trouble. It must be because of the rain.) The subsequent install of LWP::UserAgent went well. A final install WebService::Technorati completed fine as well.

So, a quick post on what I had to do to get that installed. Mainly, I needed to manually run the XML::Parser install process myself so I could create a Makefile that pointed to the existing install that I had put in via fink. Then I had to chase down some other CPAN modules that were necessary. Not to bad all told.

Just to be cautious, I tried a few things to test the install. Things were working just great. Of course, after about an hour of hacking away at some code, it looks like there are some problems with the WebService::Technorati Perl API: the SearchApiQuery does a cosmos query instead of a blog search query, but since I’ve got the .pm files, we can fix that easily enough…


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *