April 2012 Archives

Simple HipChat notifier

We needed a simple way of sending messages to HipChat (great online chat software, BTW), so I cooked up this:

#!/usr/bin/env perl

use strict;
use warnings;
use WWW::Mechanize;

# See https://www.hipchat.com/docs/api/method/rooms/message for info
my $url = 'https://api.hipchat.com/v1/rooms/message';
my $api_key = 'your-api-key';
my $from = 'User-to-post-as';
my $room = 'room-to-post-to';
my $message = $ARGV[0];
my $color = $ARGV[1];


Compiling mod_perl 2 on OS X Lion

Since updating to the latest XCode on OS X Lion, we've been unable to build or use mod_perl 2 on our development machines. If we ignore the test failures and make install anyhow, we get this error message when trying to start Apache:
Cannot load /opt/local/apache2/modules/mod_perl.so into server: dlopen(/opt/local/apache2/modules/mod_perl.so, 10): Symbol not found: _modperl_handler_anon_add

One of our developers discovered this morning that llvm/clang on OS X defaults to C99, but mod_perl expects the 89 "standard". As a result of …

About Jason A. Crome

user-pic Dancer developer, pilot, and hockey player.