For the first time ever, I took my wife and twins to London Perl Workshop. They came not only to see me give a talk, but also to watch me launch my first book, titled “Design Patterns in Modern Perl”.
The twins were excited to see if their dad was famous. To them, I am a superhero.
The day started with a hiccup—our local train station was closed for some reason, so bus services were provided instead. We took the bus to the next station and, luckily, caught a direct train to the venue near Great Portland Street. From the station, it was just a two-minute walk. As we entered, I spotted Julien Fiegehenn, Dave Lambley, and Arne Sommer. It was also good to see JJ Atria (one of the organisers) at the entrance. I hadn’t seen him in years. After a quick chat, I headed up to the main room, where I met John Davies, who gave us our name badges. I arrived just in time for the first talk. In the main room, I met Paul Evans, Sawyer X, Andrew Mehta (another organiser), Lee Johnson, Jess Robinson, James Raspass, Boyd Duffee, Martin Brooks and Theo van Hoesel.
The first talk was YAARP (Yet Another Attempt to Rewrite Perl) by Stevan Little. It was nice to see Matt still being spoken of with high regard. The kids were a little bored, as the talk was quite technical for them.
After that, it was my turn to present in the main room. Lee Johnson helped me with the microphone, and JJ Atria helped set up my slides. I really appreciated everyone lending a hand.
I noticed Paul Evans sitting in the audience, which made me both proud and nervous. I really missed Dave Cross being there.
The talk went smoothly, at least to my satisfaction. Afterwards, Paul started a discussion about one of my slides that showed an example using the Role package from Class::Mite. The discussion grew even more interesting when Sawyer X and Stevan Little joined in.
If you missed my talk then don’t worry, you can check out my slides here.
The book launch received good support—people started buying copies right away. There were some glitches on Amazon, but luckily LeanPub came to the rescue. Andrew Shitov bought the book and asked me to sign it on his phone. I wish I’d had printed copies to distribute.
Theo van Hoesel suggested I speak to Stuart Mackintosh about possible help with printing the book, as The Perl Foundation might support books on Perl.
After my talk, I attended A Whistlestop Tour of Banking Interchange Formats by Lee Johnson.
Then came lunchtime.
It was an honour to have lunch with Paul Evans and Boyd Duffee at a nearby Persian restaurant. At the table, Paul and I discussed the Singleton pattern from my presentation. He had a brand-new idea for implementing it more elegantly using Object::Pad, and he was tossing around names for it.
After lunch, I attended Lee Johnson’s talk Processor Deduplication, and later Sawyer X’s talk Probably the fastest cache in the world today.
That was it for the day, as I had to take the kids out to explore the famous Oxford Street. If it weren’t for them, I would have stayed till the end and spent more time with friends.
The next day, I saw Paul Evans had released a new update to Object::Pad (v0.822), introducing a new class attribute: :lexical_new.
So this original Singleton pattern class …
use Object::Pad;
class Singleton {
my $instance;
field $count :reader :writer = 0;
method instance :common {
$instance //= __PACKAGE__->new;
}
method counter {
$self->set_count($self->count + 1);
return $self->count;
}
}
package main;
print Singleton->instance->counter; # 1
print Singleton->instance->counter; # 2
print Singleton->instance->counter; # 3
became this using the updated Object::Pad module.
use Object::Pad;
class Singleton :lexical_new {
my $instance;
field $count :reader :writer = 0;
sub instance {
$instance //= new(__PACKAGE__);
}
method counter {
$self->set_count($self->count + 1);
return $self->count;
}
}
package main;
print Singleton->instance->counter; # 1
print Singleton->instance->counter; # 2
print Singleton->instance->counter; # 3
It is what Paul Evans termed "Conference Driven Development". I loved it.
