London Perl Mongers Technical Meeting 2012-04-11

London Perl Mongers organises technical meetings every two months. The technical meetings are a chance to find out what has been going on in the Perl community, what techniques people are using and how Perl integrates with other software.

The next technical meeting will be on the 11th April 2012 from 7pm to 9pm (you may arrive earlier, please sign in at the reception). You have to sign up to attend, see below.

This meeting is sponsored by Venda who are inviting the world-renowned Damian Conway to amuse us for one evening and will appropriately be held at the Conway Hall. Many thanks to Anthony Webster, Venda and everyone involved for allowing us to use this wonderful venue.

Venda is a SaaS eCommerce provider with offices in London as well as the US and Asia. The platform is built predominantly in Perl, and powers over 100 sites for clients including Tesco and the BBC.

Damian will be presenting:

Temporally Quaquaversal Virtual Nanomachine Programming In Multiple
Topologically Connected Quantum-Relativistic Parallel Spacetimes... Made
Easy!

My English stinks, thank you for patching it!

As a non native English speaker, writing good documentation is a hard task for me and often grammatical and spelling errors slip into my modules pod causing me great embarrassment.

I could use the spell checker more often*, but writing documentation is already a time consuming task, no fun, and well, I am lazy. In any case, that would not solve the grammatical errors.

The thing is that from time to time somebody sends me a patch correcting some of these errors and I want to say publicly how much I appreciate that kind of contribution.

A special mention goes to the Debian QA team, who seems to systematically revise the documentation of everything packed for Debian. That can't be much fun, but they keep doing it.

So, to all of you who have sent me documentation patches over the years, thank you very much, really.

STF and How We Serve Your Data

Daisuke Maki will be giving a talk at YAPC::NA 2012 described as:

STF is a distributed object store that is used in Livedoor (NHN Japan) 

The idea is the same as mogilefs, but it was built with open protocols (HTTP, PSGI) and commodity tools like Apache/Nginx, MySQL, and Q4M.

It serves several hundred million files (mainly image files) and a few million b/sec for our blog, photo share, geo-location, and other services.

In this talk I will describe what STF is, and how we set it up how we operate it.

[From the YAPC::NA Blog.]

How not to use Moose

Maybe this is legitimate and I just don't know why, but I have seen the following in a couple of projects where I have taken over after the original programmer left:

use Moose;

has [qw/foo bar baz/], is => 'rw';

no Moose;

sub something {}
sub somethingelse {}

OK, I collapsed the attrib declaration into one line for brevity. I will say that from the code, I can tell you these are not Perl programmers, they are old time C programmers with CS degrees who convinced someone they knew what they were doing because they can write psudocode for finding the first 100 prime numbers and first 20 fibs. Somehow, they stumbled across Moose, but I think they quite got it - or maybe they did and I'm wrong? In the whole application this is the only way Moose is used and it seems to me there is about 20 ways to get attrib getter/setters lighter, if that is all you want. Maybe there should be a "Common Moose mistakes" in the documentation.

I’m happy to announce that ActiveState has decided to...



I’m happy to announce that ActiveState has decided to sponsor YAPC::NA 2012.

ActiveState empowers innovation from code to cloud smarter, safer, and faster. ActiveState’s cutting-edge solutions give developers and enterprises the power and flexibility to develop in Java, Ruby, Python, Perl, Node.js, PHP, Tcl, and more. Stackato is ActiveState’s groundbreaking cloud platform for creating a private platform as a service (PaaS), and is the cost-effective, secure, and portable way to develop and deploy apps to the cloud. ActiveState is proven for the enterprise: More than two million developers and 97% of Fortune-1000 companies use ActiveState’s end-to-end solutions to develop, distribute, and manage their software applications. Global customers like Cisco, CA, HP, Bank of America, Siemens, and Lockheed Martin look to ActiveState to save time, save money, minimize risk, ensure compliance, and reduce time to market.

For more information, visit www.activestate.com.

[From the YAPC::NA Blog.]

App::ArchiveDevelCover 1.000

You can read about my latest module that helps you archive coverage reports generated with Devel::Cover in this post about App::ArchiveDevelCover on my blog. There is even a screen shot!

The new ORLite 2.0 learns some amazing SQLite tricks

ORLite is a light weight SQLite-specific ORM which is particularly handy for working with ad-hoc SQLite database and creating internal database APIs for large applications, most prominently the database API inside of Padre.

Aligning so closely with the features of a single database engine keeps the implementation size down to a minimum, at less than 1000 lines of code, and allows ORLite to do things that would be completely impossible in more general ORMs.

This is particularly true in the upcoming 2.0 release, a preview of which is available now.

http://svn.ali.as/cpan/releases/ORLite-1.90.tar.gz

This new major revision embraces SQLite's slightly unique rowid mechanism, allowing it to accurately distinguish between different copies of identical data.

Lets start with the following database in the file adam.sqlite

create table person (
    firstname string not null,
    lastname string not null,
    location string not null
);

insert into person values ( 'Adam', 'Kennedy', 'Sydney' );

insert into person values ( 'Adam', 'Kennedy', 'Sydney' );

insert into person values ( 'Adam', 'Kennedy', 'Los Angeles' );

Divide and Conquer

At least that's the goal. I've split Catalyst::Model::REST in two, so there's a new Role::REST::Client as well as the original distribution.

Originally I started CMR because I needed to access some REST services from a Catalyst application. There was nothing useful around, so I wrote a simple Catalyst Model and wrapped it up on CPAN.

It's been further developed to when there has been new requirements, and a couple of days ago the nice people on #catalyst suggested to split the functionality into a distribution of its own. The use case being that a role can be applied to an already existing Catalyst Model. Or to any other class that needs to connect to a REST server.

So here it is. Use Role::REST::Client to access REST services from your Moose based Class.
Use Catalyst::Model::REST if you just want to start a new Catalyst Model Class,

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.