Code Archives

Perl interface to LDTP testing library

Gabor Szabo realized that it's very easy to dare me to do things and then making them available for Perl. I'm somewhat like Marty in Back to the Future - "I am not chicken!"

So, now we have LDTP. However, it needs your help. What is LDTP you ask? Good question!

Session affinity (sticky sessions) for Perlbal

Following the concept of "if you haven't blogged about it, it doesn't exist", I'd like to let you know of a new Perlbal plugin, which you might find useful: Perlbal::Plugin::SessionAffinity.

Session affinity (also known as sticky sessions) is the ability to provide a user with a consistent backend from a reverse proxy, such as Perlbal. This is useful in case you cannot share the session data between backends, but do not want to lose the session.

Mind you…

Yet Another Friday the 13th

I'm an avid horror fan, big surprise! I like horror movies of all types: zombies, slasher, B-grade, C-grade, gore and even oldschool thriller horror movies like Hitchcock. To this day, I host a Friday the 13th event at my house every time for my friends and I. We run a marathon of as many movies as we can. Sometimes we make it through two, sometimes five. It's not always easy to stay up! :)

These past few months have been pretty difficult and busy. At 10pm I got a message from a friend in Canada: "happy Friday the 13th!" - Shit! I missed one! Well, no matter. The question is: how do I…

Priorities when using Any::Moose, and what Mouse people should do

A recent test script of mine broke with the following message: You can only consume roles, MooseX::Role::Loggable is not a Moose role at /usr/lib/perl5/Moose/ line 137. What happened?

This test script uses Juno and an internal module that we have at work here. Both of them use Any::Moose. They also use my MooseX::Role::Loggable which uses Any::Moose as well, in order to allow you to use it in ="https…

How I install using dzil and cpanminus

Re: Install Distros Under Development Locally.

I couldn't comment on chromatic's blog (I don't use OpenID and friends), so I figured I could post it here.

dzil run cpanm .

That's it.

Also, if you don't follow, you should start. :)

Got 20 minutes? WWW::xkcd is born!

Lately I've been having weird sleeping hours. I sleep for 5 hours here, then 2 hours there, I stay up till 4am. I know, it sounds like I'm back in school, but really, I'm not.

Yesterday at 1:50am I had the opportunity to actually go to sleep. Should I? Yes! Will I? Hmm... well... maybe I'll just watch another episode of a TV series and hack a bit.

I recently read the "about" page of xkcd and saw there is now (or has been for a while?) a proper JSON output for the comics. This means you don't have to scrape the website to get the comics. …

Call of the callback: Inversion of Control or just coolness?

Suppose I have a Runner which holds a Prober object. I need the Runner to call the Prober and update stuff according to the result. Pretty simple, right?

my $prober = Prober->new(...);
my $result = $prober->check;
if ( $result eq 'whatiwant' ) {

However, I'm running in asynchronous mode, which means I need the prober and update to run somewhere in the loop, and I can't just sit around and wait for a reply. I gotz otha dingz to do, mon! So, I have two options:

- I call th…

Abstracting the company away (part 2)

After creating company-specific schemas, I decided to refactor and abstract more issues. This mainly revolved around our databases.

If you've read the previous post, and tried it yourself, you'd notice having schemas in a central module that anyone can use was comfortable. However, if you've tried to write stuff using that schema, you probably also noticed that you have to keep reinventing some variables.

Assuming OO code, you'd have an attribute for the schema object, the database…

MetaCPAN::API gets updated

Recently I found some spare tuits and decided to spend them on MetaCPAN::API.

My main problem with the old MetaCPAN::API was that I had made a wrong design decision, and failed to take into account the flexibility of MetaCPAN. It really is flexible.

The second time around I decided I'll write it correctly, and test it thoroughly. I've moved to version 'v0' of the API (what was referred to as 'Beta API') and this helped clean up quite a bit. I was able to write it the way I wanted.


Dist::Zilla::Plugin::EmailNotify and not releasing to CPAN

We've been using Dist::Zilla at $work quite some time now.

For a while I feared the possible mistake of running "dzil release" on one of our modules or applications (we have quite a bit!) and thus releasing it to CPAN. We try to remove all generic parts of our code and push it as regular modules on CPAN so everyone can enjoy it (and we get feedback and patches and so on). This means that the rest of our code, what we keep on local repositories, are very specific to us. This cannot be released, obviously.

First job was fixing that. Easy enough. In your dist.ini:

About Sawyer X

user-pic Gots to do the bloggingz