August 2011 Archives

Help us spruce up

A long time ago, Gabor set up to highlight the recipients of these annual awards from The Perl Foundation. I was supposed to help, then I got busy. I still want to help, but we also need your help.

  • If you have any pictures of anyone presenting the White Camel awards and you'd let us use them for the site, please let us know. I found only one on Flickr, but maybe there are more that aren't tagged.

  • I'm also keen to get a photo of me announcing the awards in my 5 Lats "I Riga" shirt.

  • If you are a White Camel recipient, we'd like to add a nice picture of you next to our wonderful words about your myriad accomplishments and additions to Perl.

  • We're already thinking about next year. In fact, we're always looking for candidates for White Camel recognition. If you have suggestions, let us know.

The 2011 White Camel Awards

The White Camel Awards recognize outstanding, non-technical achievement in Perl. This year, the White Camels recognize the efforts of three people whose hard work has made Perl and the Perl community a better place:

Leo Lapworth makes Perl websites not suck.

Daisuke Maki rocks the Japanese Perl community.

Andrew Shitov is a Perl-conference-organizing mega-monster.

Read more at Perl News.

Normalizing Perl variable names

Tom Christiansen filed RT 96814 noting that Perl identifiers (that is, variable names and such) should be normalized.

I covered this today in my Surviving Perl Unicode course at YAPC::EU in Rīga. Here's a program that output another Perl program that shows the problem:

use 5.010;
use utf8;
use charnames qw(:full);

my $var = time % 2 ? 

binmode STDOUT, ':encoding(UTF-8)';
print <<"PERL";
use utf8;
use 5.010;
use strict;
use warnings;


\$$var = 'XYZ';

say "One char = ", \$\N{LATIN SMALL LETTER E WITH ACUTE};
say "Two char = ", \$e\N{COMBINING ACUTE ACCENT};

The output looks like:

use utf8;
use 5.010;
use strict;
use warnings;

my $é = 'abc';
my $é = '123';

$é = 'XYZ';

say "One char = ", $é;
say "Two char = ", $é;

Now, the trick is that by just looking at the source, you can't how many variables it has or what it is going to output. There are no strict violations or warnings.

It shouldn't matter to us how we made those variable names. They are the same idea no matter how I formed them, what my editor does to normalize, and so on.

About brian d foy

user-pic I'm the author of Mastering Perl, and the co-author of Learning Perl (6th Edition), Intermediate Perl, Programming Perl (4th Edition) and Effective Perl Programming (2nd Edition).