Want a practical example of how yak-shaving works?

I want to export my bookmarks file to del.icio.us.

Turns out del.icio.us doesn’t have an import function. Alex points me to a Perl script, del.icio.us import, that will do the job.

I download the file, save it to the same directory as my bookmarks file, and launch Terminal. I enter the command as directed, finally remembering I have to start it with “perl “.

I get an error message that XML::LibXML can’t be found. I dimly remember that syntax; it’s a Perl module. So how do I install it?

A Google search turns up this page on Apple’s open-source pages. Apparently I have to launch and configure something called CPAN, the Comprehensive Perl Archive Network.

Ooooooookay. I do that, hitting “Return” many, many times and installing the text-only browser Lynx for good measure. (CPAN asked if I had it. The installation went fine, except I can’t get it to work. Maybe I don’t actually need it.)

I use CPAN to install the two Perl modules that the script requires. (Remember the script? The importing? The reason we’re all here?) CPAN tells me I need to download a bunch of other modules first, or these ones will set fire to my kitchen and strangle me in my sleep. Okay, done.

Now I fire up the script again. “Can’t locate LWP.pm.” What the hell is LWP.pm?

I launch CPAN again (and load the command into my clipboard — something tells me I might need it again soon). The command “install LWP.pm” fails, but this page tells me to just say “install LWP”. Okay, CPAN starts searching for that file across the various FTP sites it uses.

And searching…

One problem is that CPAN doesn’t learn too well. If a technique for downloading files didn’t work last time — like, say, using my non-functioning installation of Lynx — it tries the same thing all over again this time.

At last, it just tries plain old FTP, and a series of lines flies down my Terminal window. I exit CPAN, try to run the script again…

…and get this: “Wide character in subroutine entry at delicious-import.pl line 419”.

So I’ve left a comment at the del.icio.us import script web page… and we’ll just see how this goes. Stay tuned for yet more stultifying detail.

And the saga continues…

Brian Del Vecchio, author of the script, came back within less than half an hour with a new version. This one got much further, chugging through several URLs before complaining.

(This, incidentally, is the upside of yak-shaving. The time I spend working through all of this, and the time Brian’s spending troubleshooting, is time that umpteen other folks who are trying to accomplish the same thing won’t have to spend.)

Mastodon