Tag Archives: modern perl

What New(ish) Perl features Do You Use?

Over on LinkedIn, someone asked me “What core PERL[sic] features do you use regularly that are new since 95?” It’s hard to be sure as the perldelta files only seem to go back to 1997 (for example, when were qw(...), q(...) and qq(...) added?), but here’s a quick list off the top of my head.

  • my was, of course, added in 5.0. But 5.004 added the ability to use it in control expressions – while (my $foo = <>) – and in foreach loops – foreach my $foo (@foos)
  • use VERSION
  • Regex extensions – (?<=RE) and similar. Oh, and qr/.../
  • Data::Dumper (added in 5.005)
  • Unicode support – first added in 5.6.0 and improved in every release since
  • our
  • Three-argument open
  • Omission of intermediate arrows in data structure lookups – $foo[$x][$y] instead of $foo[$x]->[$y]
  • use warnings
  • Memoize
  • Test::More and Test::Simple
  • say
  • defined-or
  • use base (or, more recently, use parent)
  • yada-yada operator

Have I missed anything obvious? What new Perl features do you use most?

What is Modern Perl?

I wrote an article for Josette called “What is Modern Perl?” In it, I talk about the different things that people might mean when they talk about Modern Perl and why it’s well worth buying a copy of the new edition of the camel book.

After a gap of twelve years, a new edition of Programming Perl (affectionately known as “the Camel book” to its many fans) was published earlier this year. That came as quite a surprise to many people who had given up on seeing a new edition.  What has changed in the new edition? Does the book now cover Modern Perl? The answer depends on what you mean by the term “Modern Perl”.

Of course it’s not a complete coincidence that the subject ties in nicely with my forthcoming Modern Perl for Non-Perl Programmers course.

Update: There’s a discussion of the article on Hacker News. It seems to be taking a predictable path.

Yet More Modern Perl in Linux Format

Over the weekend the postman bought me my subscribption copy of Linux Format issue 155. This contains the third (and final) part of my Modern Perl tutorial. In this part we’re adding features to the Dancer web application that we started in issue 153.

This series has concentrated on web applications (with Dancer) and database access (with DBIx::Class). I’ve already got provisional agreement for another short series later in the year – where I plan to cover OO programming using Moose.

The new issue will be in the shops later this week.

More Modern Perl in Linux Format

Yesterday’s post bought my subscription copy of Linux Format issue 153. This issue contains the second article in my short series about Modern Perl. In this article we take the simple DBIx::Class application that we wrote last time and put a web front end on it using Dancer.

Over the next few days I’ll be writing the third (and final) article in the series. This will involve adding more features to the web app.

If the series is successful (and please let LXF know if you liked it) then perhaps I’ll be asked back to write more next year.

LXF 153 should be appearing in all good newsagents next week.

Modern Core Perl

The London Perl Workshop is in two weeks time. Have you registered yet? There are apparently 200 people signed up already.

I’m going to be there giving a training course in the morning. It’s called Modern Core Perl and it will introduce many of the new features that have been added to the Perl core since version 5.10.

The course is ninety minutes long and attendance is completely free (as it is for all of the workshop). I was planning to write a post encouraging people to sign-up for the course, but it seems that will be unnecessary. I already have twenty people signed up and until I know for sure how big the room is I’ve had to declare the class full as I don’t want to run the risk of people signing up and not being able to fit into the room.

Unfortunately, though, the workshop web site doesn’t really have the concept of signing up for courses. So it’s impossible to actually stop more people signing up for the course. In fact, two more people have signed up since I edited the description to say the course was full.

I hope that the room will be large enough to allow us to let a few more people in on the day, but we will be strict on not overcrowding the room.

I apologise in advance if you want to come to the course but can’t get in. Perhaps you’ll consider Ian’s course instead. Or there will be three or four tracks of other talks going on at the same time.

Modern Perl in Linux Format

A couple of times, I’ve complained here about the standard of Perl articles in the British magazine Linux Format.

Following the second of those articles I got into a discussion with Graham Morrison, the editor of the magazine and he offered me the opportunity to improve matters by writing my own short series of tutorials for them.

The first of those tutorials appears in issue 151 of the magazine which will be appearing in UK newsagents about now.

The series is called “Modern Perl” (in an attempt to distance it from their earlier tutorials) and the first article is about how easy it is to write a database application using DBIx::Class. The second article will take the same database and build it into a simple web application using Dancer. That will hopefully be in issue 153 (skipping an issue). There will probably be a third article in the series which will add features to the web application.

I’ll find out what my rights are to the articles and hopefully I’ll be able to put them on the web at some point in the future.

If you see a copy in your newsagents then please consider picking it up. And if you enjoy the article, then please let the magazine know.

Training in Riga

YAPC Europe is getting closer. We’ll all be heading off to Riga in about six weeks.

As has become traditional, there are a number of training courses being held both before and after the conference. This includes my Introduction to Modern Perl course on Sunday 15th August.

The course is a one-day overview of many of the major modules that make up the modern Perl toolset. If you feel that you need a quick refresher on things like Template Toolkit, Moose, DBIx::Class, Catalyst and Plack before diving into the conference proper, then this might well be just what you are after.

The cost is 180 € and you can buy a ticket when paying for the main conference.

There are many other course available too – from well-known Perl trainers like Damian Conway, brian d foy and Gabor Szabo. All of the courses are priced well below our usual rates.

I look forward to seeing you in Riga.

Modern Perl at OpenTech

 

OpenTech is an annual one-day conference in London where geeks get together and share information about cool things they are doing with technology. The emphasis is on projects that improve society in some way so you’ll see a lot of talks about really interesting projects. Usually the talks concentrate more on the user aspects of the projects and it’s rare to hear very much detail about the underlying technologies.

I was therefore slightly surprised to be invited to invited to give a talk about Modern Perl at this year’s conference. But I grasped the opportunity to speak to a room of geeks who might not be keeping up to date with Perl technology.

The slides are now on SlideShare. Bear in mind that I was aiming at a non-Perly crowd and that I only had twenty minutes – so it’s possible that I didn’t have time to cover your favourite Modern Perl project.

 

Modern Perl at OpenTech

I mentioned a few months ago that I’d be running an “Introduction to Modern Perl” training course at YAPC::Europe this year. But in the interests of speaking outside of the Perl community as much as possible, I’m also going to be giving a slightly different version of that course at the OpenTech conference in London in September.

I say “slightly different”, but that’s a bit of an understatement. The original training course runs for six hours. The OpenTech talk is twenty minutes. But hopefully that will be long enough to introduce some people to many of the interesting things that are going on in the Perl world.
It you’re going to be in London in September, then the OpenTech conference is always a lot of fun. I highly recommend that you come along. It’s cheap too – just a fiver on the door.