The only bad thing about Mason

At the moment, I'm writing a presentation about Mason2. The goal is to somehow convince my colleagues to consider using Mason. Instead of Template Toolkit.
As part of it, I thought I'd do a bit of performance benchmarking against Template Toolkit. So I put together a reasonably complex mini set of templates using both systems. Well, as complex as TT can take in reality. Which is not very much.

But anyway, let's jump straight to the bad news.

Notes from a Newbie 10: Authentication/Authorization

Notes from a Newbie document the creation and deployment of yardbirdfanclub.org with Perl Catalyst on shared hosting. They are intended for a Perl Catalyst Newbie who would like to study the creation and deployment of a simple Perl Catalyst application.

Now that we've experimented a little and are confident in what we're doing, we'll start over from scratch, beginning with authentication and authorization as explained in the Catalyst tutorials.

Holy bloat, Batman!

Let's compare the latest constant.pm to a minimal equivalent:
    $ ./perl -Ilib -le 'print $^V'; /usr/bin/time -l ./perl -Ilib -le 'use constant X => 1..5; print X' 2>&1 | grep 'maximum resident'
    v5.17.10
       3829760  maximum resident set size
    $ /usr/bin/time -l ./perl -I/tmp -le 'use constant X => 1..5; print X' 2>&1 | grep 'maximum resident'
       1200128  maximum resident set size
That's 2.6MB bloat to define a constant. (The culprit turns out to be utf8, natch, to handle Unicode constants. (Why, God?!)). For reference, /tmp/constant.pm , which does most useful constant-type stuff, is here:

YAPC::Europe 2013 in Kiev, week minus 24. Booking a hotel and discounts

Hi,

A couple of days ago we launched an incredible service for the attendees of this year's YAPC::Europe in Kiev.

Book the hotel using our service and do two things at once:

  • You will get the room with the lowest available price.
  • You will support the conference by increasing the conference budget (at zero price for you!).

All the details about how it works are published in this week's conference newsletter.

Find your hotel now: act.yapc.eu/ye2013/accommodation/index.html.

Stay tuned. We've got more cool stuff.

Swiss Perl Workshop - Venue

If you are still undecided on joining us at Swiss Perl Workshop in Bern on March 22, it's probably because you are worried that the venue may be hard to reach. You can put your mind at rest. :-)

http://act.perl-workshop.ch/spw2013/venue.html

We are at the main building of the University of Bern, just 2 minutes from the main train station in Bern.

unibe-hauptbau.jpg

If you also require a beautiful view then take a chance and hope for good weather. ;-)

Thanks to our sponsors:
www.perl-magazin.de | www.oetiker.ch | www.leanux.ch | www.booking.com | www.oreilly.de

Pod to HTML

OK, so there were already a thousand solutions for converting pod to HTML, but I wasn't especially happy with any of them. Things I wanted were:

  • Clean-looking XHTML and/or HTML5 output.
  • Unicode support. ☻
  • Good syntax highlighting for Perl code samples within the pod.
  • Links to metacpan.org by default rather than search.cpan.org.

And so I've cobbled together a solution using Pod::Simple, PPI::HTML, HTML::HTML5::Parser, HTML::HTML5::Writer, XML::LibXML::PrettyPrint and Moo, and released it as TOBYINK::Pod::HTML.

no indirect considered harmful

Several p5p members argue that using indirect method call syntax is considered harmful.

I argue that using indirect method call syntax is the best and sometimes only way to extend the language without changing core or the parser rules.

method_name ClassName @args;
method_name $obj @args;

vs

ClassName->method_name(@args);
$obj->method_name(@args);

E.g. mst argues in "new Foo bad, 'no indirect' good" that the parser is too dynamic in deciding if something is a valid method call or not.

He gives three examples:

(1) Is a valid class name? If so, this is a method call.

use Foo::Bar;
new Foo::Bar @args; # calls Foo::Bar->new(@args)

(2) Is bareword a known subroutine name? If so, this is a sub call.

Better late than never - Perl School is awesome!

Three Saturdays ago I attended the fourth Perl School, which was about DBIx::Class.

Top line summary: it was brilliant!

This was the second course I've attended from Dave Cross, and the first one under the Perl School banner. Dave has been using Perl heavily for around two decades up to and including this year, which gives him a very deep knowledge that is also firmly up-to-date. He is also an excellent presenter and trainer, so all that knowledge I just mentioned comes pouring out freely in a way that is easy to understand.

Think Python in Perl 6 Chapter 4: Interface Design

It is time for Chapter 4 of Allen Downey’s Think Python refashioned in Perl 6. I just needed some time to make a simple wrapper for his Swampy framework. Feel free to install and play along, but don’t rattle Swampy.pm6 too much. I have only implemented enough to finish this chapter.

Then again, go ahead.

Play Perl: Sign In with Email

Starting from today, you can sign in to Play Perl using email, even if you don't have a twitter account. (It won't ask you for password; it uses Mozilla Persona.)

Quick recap: Play Perl is a new social and gamified website for Perl developers, where people can declare their open source plans and get points for completing them. I launched it 2 weeks ago.

This week was much slower than the last, due to me being back to my daily job from vacation. Still, I managed to get more than a 100 commits in, including:

  • the ability to unclaim quests, moving them into a global "up-for-grabs" pool
  • the ability to abandon quests without removing them
  • RSS for the global news feed
  • 4 separate explore sub-tabs
  • performance optimizations
  • many refactorings, html improvements, bugfixes and new bugs, as usual

Also, thanks to the awesome creaktive@, Play Perl got a favicon. And then, thanks to the awesome neilb@, it got another one :)

Strawberry Perl 5.16.2.2 released

Strawberry Perl 5.16.2.2 is available at http://strawberryperl.com
(all editions: MSI, ZIP, PortableZIP for both: 32/64bit MS Windows)

More details in Release Notes:
http://strawberryperl.com/release-notes/5.16.2.2-32bit.html
http://strawberryperl.com/release-notes/5.16.2.2-64bit.html

Pumpkin Perl Patchset

The blog post.

The github repository

Comments?

EplSite ETL

EplSite ETL is an open source tool, developed using Perl, to do easy the data migrations, doing extraction, transformation, validation and load in a very fast way.

It is very low resource consuming and use a web interface for data transformation creation.

The transformations can run using the web interface or a batch process and as a batch process you can schedule tasks to run in automatic way.

EplSite ETL runs in all the environments where Perl runs, Linux,Windows,OSX, Unix.

It was built by people involved in data migrations so, it contains the necessary to do the migration(Extract Transformation, validation and load) and do it well.

The last release is 1.1, it is running in production environments now, EplSite ETL can be downloaded from here:

sourceforge.net/projects/eplsiteetl/

Perl programmer humour

Three examples of perl programmer humour I've seen in code and/or documentation. Read the comments for more examples.

Crypt::RSA without Pari

Crypt::RSA is a module that's been around since 2001, when Vipul Ved Prakash put it on CPAN. It's had only very minor updates since then, and gets used by a few other modules. However, it's had one big problem: it uses Math::Pari for all its calculations, and two of its dependencies (Crypt::Primes and Crypt::Random) also use Pari. Debian in particular has been pining for a version that gets away from the Math::Pari dependency (see RT52689 for some reasons).

I decided to go ahead and do the Pari removal, and it's on CPAN as Alt::Crypt::RSA::BigInt. This uses Ingy's Alt framework -- install the Alt version and you get a new shiny Crypt::RSA. Install the old version and you're back again. There are no Pari dependencies, and if Math::BigInt::GMP is used, it's 5 to 11 times faster. I decided to use Math::BigInt directly, as that makes it very portable, though the speed without either the GMP or Pari backend leaves much to be desired.

A perl of your own

Want per project perl defaults that save boilerplate? You want your perl - you want myperl.

Method::Signatures: here a tweak, there a bugfix


Just a quick note to say that I’ve released a new version of Method::Signatures today.  There’s nothing major, just a few housekeeping duties.  Here’s the highlights:

YAPC::NA 2013 (Austin, TX June 3-5) Update

DBIx::DataModel - Elegant Database Interaction with Perl

DBIx::DataModel (DBIDM) is an Object Relational Mapper for Perl that is very elegant, simple and effective. It helps you to efficiently interact with your database.

This article discusses three of the great features of DBIDM and how I find they help me to develop software more efficiently. The three features discussed are:
  • results are hashes - so it is very easy to manipulate and debug query results,
  • schema generation is fast, clean and effective - so we very quickly get a useful map within Perl of just the most important aspects of our database, and
  • the API allows inserts, updates and selects to be defined extremely efficiently - keeping the easy things easy
The article also provides a very brief introduction to DBIDM and some notes on getting started with it. There is also a rough example demonstrating how I combine DBIDM with Perl Dancer.

if you build write it they will come

After reading some of the posts about renaming Perl to something else I noticed that a commonly used argument was about the language visibility. Personally I don't want to take party here and restart all the discussion about that issue, I think a lot of people more capable and committed to the language evolution already gave their opinion.

My point here is about that comment mentioned before, the language visibility and appearance. If the way how people see and remember Perl is the problem, I think that we can come up with some kind of solution without any dramatic changes in the language itself, and I'm going to tell you how, in my opinion, we could address this issue.

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.