programming

  • A single script for hosting your own single OpenID identity. Easy to set up with Apache. (IIS with ISAPI_rewrite, hard.) Supports the sreg extension.
    filed under: development, identity, php
  • Here's the "sreg stuff" for OpenID. Avatars aren't mentioned in the spec.
    filed under: development, identity, programming
  • Avatar auto-discovery standard. Seems like a natural fit with OpenID. This should be added to the optional sreg stuff.
    filed under: design, development, identity
  • Firefox Add-on lets you click and drag any form field to resize. (Unfortunately, it doesn't remember your field size preference.)
    filed under: firefox
  • Open source remote desktop client for Windows RDC on Mac OS X. Handy if you need to manage Windows servers from Mac. I hear it's more stable than the official Microsoft RDC client for Macs.
    filed under: programming, mac, software
  • PHP code for validating/filtering HTML input.
    filed under: php, programming, security
  • this site maintains a database of md5 hashes and the original text. This is a good starting point for decrypting these supposedly one-way hashes. If you're storing passwords as md5 hashes, don't forget the salt.
    filed under: hacks, security, identity, programming
  • If you do any ColdFusion development (shut up!), you should check out this CF Textmate add-on. With this + Transmit, I prefer TextMate to HomeSite now for writing CF.
    filed under: programming, software
  • hooray! Click this link to set a cookie (with cookie technology) to disable those annoying Snap site previews that are popping up everywhere. [thanks torrez]
    filed under: marketing, internet
  • Leonard Richardson and Sam Ruby are writing a book about designing REST web services.
    filed under: webservices, books, programming
  • Flash upload progress thingy for web apps. [via mathowie]
    filed under: design, development, flash, programming
  • a bunch of useful web services, and some wacky services like detecting nudity in a photo. (via waxy)
    filed under: programming, webservices

Compiling Perl modules on Windows

I've been doing quite a bit of Perl scripting for Yahoo! Hacks, and I can safely say it's my scripting language of choice now. A big reason for this is the abundance of pre-existing modules available. Why reinvent the wheel if someone else has been there before? I also develop most of the scripts on a Windows machine running ActivePerl. It works well, but the modules available via the ActiveState Perl Package Manager leave something to be desired. Many of the modules I want to use are only available via CPAN, which means I have to compile the modules for Windows myself.

Compiling Perl modules isn't normally a big deal. In fact, on my Mac it's a snap. I simply downloaded the Mac Developer Tools and started make-ing stuff all day long. I assume the same is true for Linux. Windows is another story.

Compiling modules would probably be easy if I was a C++ developer, and had a copy of Visual Studio Something-or-other with its own compiler. But I'm a thrifty scripter, and I just want some Perl modules to work. So I had to go through a series of steps, and put all of the pieces into place to be able to compile modules. I thought I'd write it up here in case anyone else out there is pulling their hair out like I was.

How to compile Perl modules on Windows without a Visual Studio:
  • Get nmake. (direct link to file.) This is your compiler.
  • Sometimes you'll need a file called Windows.h. Install the Windows SDK.
  • Sometimes you'll need a file called msvcrt.lib or msvcr70.lib. Install the .NET framework SDK.
  • For everything else you need install the Visual C++ Toolkit.
  • At this point, you will have installation fatigue. Take a break.
  • Inside the VC++ Toolkit is an important file called vcvars32.bat that adds some key directories to your system PATH variable. Edit this file so that the lib and bin directories of each of the kits you just installed will be added to PATH when you run this batch file.
With these behemoth kits in place, you should be set to start compiling Perl packages. Once in a while you may need the odd odbc32.lib—it's included with the SQL Server developer tools. Don't have it? Start installing. ;) And when you're done, don't forget to add its directory to your PATH.

Run vcvars32.bat before you start compiling a module to get your paths in order, and then run nmake like you would make:

nmake test
nmake install

I was almost in tears when things were compiling correctly. :) I have to let you know that I'm not a Perl expert, and compiling modules like this may wreak havoc with your system. But it's working fine for me.
« Older posts  /  Newer posts »