Live(ish)

Over on Perl Hacks this morning, I announced the existence of this site. Ovid followed up with a mention on his use.perl journal . Which means, I suppose that we're live and can expect people to try to register, log in and actually use the site.

All of which is slightly problematic if the site decided to throw dozens of resource allocation errors which turn into generic web server errors by the time they get back to the user's browser.

Sorry about this. We are working as hard as we can to resolve this issue. I'll let you know when we think it's fixed.

Why blogs.perl.org?

If I recall correctly, this project started a year and a half ago in Copenhagen when several of us were talking about the idea of having a modern blogging platform for the Perl community. Naturally, it had to be written in Perl. We've deliberately kept this low-key as we have known others talk about this before, but nothing came of it. It's good that we kept it low key because it's been a long time coming.

There was a private mailing list and we (participants can out themselves if they choose) discussed at length the various features we might want. While we never had complete agreement, a compromise set of things was pretty much agreed upon.

  • A multi-user blogging platform.
  • Must be written in Perl.
  • OpenID support (for commenting, but not blogging).
  • Tags.
  • Images (yay!)
  • Syntax highlighting.

The images were very important to me, at least, because sometimes I want to do stuff like have a quick image of a class hierarchy:

Moose Class Hierarchy

Hello, world.

Excited to see this up and running! Congrats.

HTML::Tidy quicky

Yay - my pull request got merged in. People trying to build on OS X should use the GitHub master until Andy gets his updates onto CPAN.

www.perl.org - redesign

Well, it's taken me 6 weeks of evenings and the odd weekend, but I'm proud to say the new http://www.perl.org/ site has just gone live.

This is a complete redesign and content review. Hopefully it's cleaner and easier for people to actually get the information they are after.

Whilst I was at it I also implemented this skin for http://dbi.perl.org/ and http://learn.perl.org/ (which needs a lot more loving now you can actually see what's there... not much).

My work (http://www.foxtons.co.uk/) have donated some of my time, and also some of the designers on my team's time, without which it would have taken even longer.

So enjoy!

Alternatives To Inheritance

This is repost of a use.perl entry I made. You can clearly see the "before" and "after". Which do you prefer?


I'm planning to write a long article about alternatives to inheritance. Part of the issues with multiple inheritance in Perl programs seems to stem, in part, because there doesn't seem to be enough written about this from the Perl perspective

There's also not enough perspective from a "large-scale" standpoint. I still recall one person defending "mixins" because in years of programming, he's only been bitten by the mixin ordering problem once. However, when you start working on large scale, mission-critical applications with teams of programmers being rotated on and off the project, issues with multiple inheritance, silently overriding methods, mixin ordering and other issues are much harder to notice, much less track down. And even comprehensive test suites can miss that subtle bug which depends on a very unusual combination of factors. I speak from very painful experience here.

Test Test Test

Always test stuff. Testing is good.

A New Conference Season

The 2009 conference season hasn't ended yet and already I am booking flights for next year's conferences. It looks like I will be attending both Perl Oasis and Frozen Perl at the start of next year. I won't be travelling back to Japan between the conferences so I should also get some time to meet up with the Perl Mongers in Pittsburgh and New York.

The games afoot...

There is so much happening in the world of Perl at the moment...

  • New blogs (this was posted to https://blogs.perl.org/!)
  • New web designs (more on this another time)
  • New approaches (Moose, Catalyst, DBIx::Class etc etc etc)
  • New initiatives (Iron Man, TPF marketing etc etc)

I haven't historically been a blogger, but I think some of the projects I do at work (http://www.foxtons.co.uk/) as well as home might be of interest, so I'll try and do the occasional wright up here.

Test::Aggregate::Nested

Currently I'm trying to convert our work test suite over to Test::Aggregate::Nested. This is an alternative to Test::Aggregate which is much cleaner internally and relies on nested TAP, available in the latest versions of the Test::Simple distribution. Using it is pretty simple:

use Test::Aggregate::Nested;

my $tests = Test::Aggregate::Nested->new( {
    dirs => $aggregate_test_dir,
} );
$tests->run;

There are a few more features I need to hack in, but two nice advantages this provides are:

  1. The restriction on __END__ and __DATA__ tokens goes away.
  2. "Variable will not stay shared" warnings go away.

Regrettably, it turns out that I've introduced a regression in Test::Aggregate itself. Apparently, "no_plan" tests don't work correctly, but this may be the nasty hacks to the Perl internals which Test::Aggregate relies upon. Fortunately, the nested version minimizes those hacks quite a bit.

In praise of Try::Tiny

Try::Tiny is one of those tools that feels like it should always be in your toolbox. Handling exceptions in Perl is awkward; Java, JavaScript, Python, and Objective-C all provide native try syntax. Perl does, mostly, via eval {} blocks, but it's hinky. Errors coming out of the block aren't local by default, and it's almost a dozen lines of boilerplate to add it properly.

Enter Try::Tiny:

A Blog Post

Introducing blogs.perl.org . I'm so happy!

So close, so close ...

It appears that, at long last, we'll get a proper blogging platform! With syntax highlighting:

    sub add_to_list {
        my ( $self, $text ) = @_;
        return unless defined $text;
        $text = $self->interpolate($text);

        # This horror of horrors is because we want simple lists to be single
        # spaced, unless there are further details after the =item line, in which
        # case an extra newline is needed for pleasant formatting.
        my $break = '';
        if ( $self->list_data =~ /\n.ITEM\n.*\n$/ && $text !~ /^.ITEM/ ) {
            $break = "\n";
        }
        $self->list_data( $self->list_data . "$break$text" );
    }

And we even have images! (Not that they're helping this post look any better.

And if you look down below, you even see tags :)

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.