Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

geoff (2013)

  reversethis-{gro ... om} {ta} {ffoeg}

see [] for personal information, links to presentations, GPG key, and so on.

Journal of geoff (2013)

Thursday October 28, 2004
01:48 PM

PSA: Time to Check Your Backups

on monday, I noticed that my backup routines had not run on my main workstation since july 16. fortunately, it was a minor issue that made me seek out a backup (the loss of my mozilla bookmarks when I installed livehttpheaders).

so, consider this a fine time to check your backup scripts and make sure that everything is just the way it needs to be.
Monday October 25, 2004
03:13 AM

sqlite in perl and php

so I'm trying to use both DBD::SQLite and php (5.0.2) to access the same sqlite database. depending on who creates the database file I get

file is encrypted or is not a database

errors - in php if I use perl to create the file and perl if I use php. some initial googling seems to think that it's because the two libaries are using different sqlite versions, but I'm not entirely sure.

please tell me that someone has seen this before and there is an obvious fix to the compatibility issues.

Tuesday October 19, 2004
11:04 AM

PHP support for Apache-Test

Chris and I are working feverishly on our co-presented talk for ApacheCon (which we are practicing next week at NYPHP) on testing PHP with Perl.

the first aspect of the talk (from a testing standpoint, that is) is to use Apache-Test to make requests to some php pages that are part of a smallish application using built-in Apache-Test tools as well as standard perl tools like WWW::Mechanize. the way Apache-Test creates a pristine and self-contained Apache environment is just perfect for this kind of thing.

the second step is actually a bit more interesting. over in mod_perl land we use PerlHandlers to interact with Test::Harness so that we can unit test perl modules that rely on an Apache enviroment, such as the entire mod_perl API. well, I've been hacking away at the Apache-Test server-side interface and have added all the hooks necessary to have php server-side tests as well. in other words, use Test::Harness to run *.t tests that query a running Apache server and feed results right back to Test::Harness over STDOUT. I even integrated (and began to expand) Andy's Test::More emulation layer for PHP to make life even easier.

have no idea what I'm talking about? install Apache-Test then unpack and run this tarball and you'll have a taste of what is possible (and what our talk will only begin to touch upon). of course, you'll need a php-enabled Apache first, but installing php isn't all that bad. honest.

next up, a similar Apache-Test server-side harness for mod_parrot.
Tuesday October 12, 2004
09:30 AM


I just picked up Bjork's new album, Medulla, and its quite possibly the coolest album I've ever come across (but I've been a Bjork fan since her sugarcube days, so I'm a bit biased). if you haven't heard about Medulla yet (or what makes it uniquely unique) Wired had this description.

I guess I wouldn't have brought this up here except that I just went to the website for the album and found that it was really engaging (unlike most other artist sites) and good for a diversion.
Monday October 11, 2004
10:54 AM

ApacheCon tutorial in danger

I just received an email that my ApacheCon tutorial, "Test-Driven Apache Module Development", does not have enough registered attendees to be above the break-even point, which means it may be in danger of being cancelled. a similar thing happened with my OSCon tutorial which, oddly enough, ended up being one of only a handful of tutorials that were sold out in the end. go figure.

anyway, here is the description (very un-sexy) I came up with for the tutorial:

Writing tests is up there with documentation as the thing we coders dread the most, but for Apache developers it doesn't need to be that way. With the Apache-Test framework, the engine behind much of the httpd-test project, testing your code can be more exciting than writing it! Imagine a world
where your Apache module contains a full suite of integrated tests that even your boss can run - it's self-documenting fun!

In this session you will learn about using the Apache-Test toolkit to:

  - issue a single command that will configure Apache, start the server, run your tests, shutdown the server, and issue a success report
  - test against 1.3, 2.0, or 2.1 Apache server installations
  - use the test framework to automatically compile and configure Apache C modules
  - write simple test scripts that mimic client behaviors
  - examine basic testing principles to help methodically guide test writing
  - impress your boss, get a raise, make new friends

If you develop or maintiain Apache modules in either C or Perl then this is one session you can't afford to miss.

in a nutshell, all of that means that it will be a guided tour of using the amazing Apache-Test framework to set up automated testing of all things Apache. I actually am planning on making the tutorial semi-interactive, moving through code examples in a tarball and having attendees try to run them with different options on their own as we go. overall, I think it will be a great learning experience for attendees, as I use Apache-Test every day and have all kinds of cool and helpful things to share.

anyway, if you have an interest in this kind of thing, please go ahead and register while there is still room. ApacheCon is a great conference, with a different, more intimate feel than OSCon, and will be well worth your time.

Monday September 20, 2004
09:54 AM

use.perl buglet?

I submitted a story on ApacheCon early bird registration the other day (complete with reasons why perl folks would be interested in the conference), but it has yet to appear on the main page. with use.perl being moderated and all, this is fine - maybe somebody didn't like the story, or nobody has had the time to review it. however, I have a feeling that there is a bug someplace - my submit page reports this:

Here are your recent submissions to use Perl, and their status within the system:

    * 2004-09-15 14:11:52 ApacheCon Early-Bird Registration (Index,Events) (pending)
    * 2003-12-16 14:48:12 OSCon 2004 Call for Participation (Index,Events) (accepted)


    *   pending (1)
    *   accepted (1)

but the listing of pending stories doesn't show mine in the queue.

can anyone with use.perl karma tell me if the story made it through for moderation?

Monday September 13, 2004
04:46 PM

jury duty

so I just finished day one of my stint in federal jury duty. I can't think of other facet of life that represents such a colossal waste of energy and time. I suppose that actual jury duty isn't a waste, but I spent all day sitting around in a room full of 400 sweaty people, packed together like pickles, only to be told at the very end of the day that I had been chosen to serve starting tomorrow. the amount of time this service requires has yet to be determined, but I'm sure that it will involve lots of pointless waiting.

and just to top it off, what's waiting in my mailbox when I get home from this fiasco? another jury summons, for exactly one month from now, for local jury duty.

Friday September 03, 2004
12:52 PM

ApacheCon 2004

Thank you for your recent session proposals for ApacheCon US 2004.

The following sessions have been accepted and scheduled.

  (1003) 'Test-Driven Apache Module Development'
  (1059) 'mod_perl 2.0 at Warp Speed'
  (1071) 'Testing PHP with Perl: Two Great Tastes that Taste Great Together'

Test-Driven Apache Module Development, while a pretty boring title, should be very interesting for anyone who does heavy mod_perl or Apache C module development. it's a three-hour, in-depth tutorial all about using the integrated features of the Apache-Test framework to help test your Apache-based applications. in other words, the really cool stuff that I use every day that I really can't get to in a 45 minute introductory session. ok, I know it still sounds boring, but you'll love it, I promise - I'm rarely as boring as I make things sound.

mod_perl 2.0 at Warp Speed will be me racing through all the new and interesting features in mod_perl 2.0. at least that's the plan...

Testing PHP with Perl is a session that Chris Shiflett and I are co-presenting - the title says it all. if you can't make it to ApacheCon, Chris and I are giving a pre-conference runthrough at New York PHP on October 26.

hope to see you there.

Tuesday August 31, 2004
03:18 PM

overriding core functions

I spent some time today trying to override perl's time() function for some tests. after a few iterations in solitary that didn't quite cut it, I stumbled upon this list discussion. and so, after far too much independent work, 5 minutes of google yielded

  *CORE::GLOBAL::time = sub { CORE::time };

  no warnings qw(redefine);

  local *CORE::GLOBAL::time = sub { $time };

while I got the BEGIN part on my own, the trick I was missing in my own hacking was to reassign CORE::GLOBAL::time() to itself so that it would continue to function until my local overrides went into effect.

I imagine that most test-driven people already know this, but just in case I wasn't the only person sleeping in class I thought I'd post it here.

Thursday August 26, 2004
09:33 PM

it's a girl!

Ruth Anne Young

born: August 26, 2004 at 8:50AM
weight: 6 pounds, 11 ounces

after a long night and a painful labor, everyone is doing fine.