April 2011 Archives

Three things I'd Change About Perl

Ovid asks about three things you'd change about Perl, which is similar to my standard interview question What are five things you hate about Perl?. I never really answered the question myself, although I did let go of one thing in my Frozen Perl 2011 Keynote: the connection between module names and filenames. Breaking that connection helps with my second thing.

I want first-class classes that I can store in a variable. I want to be able to load multiple and different versions of a distribution. As part of that, I'd want to load distributions, not particular modules. I'd get to the modules through the distribution. I haven't really thought about the syntax for this, though.

I would also be able to load things lexically:

 sub some_sub {
      my $lwp_dist = import( 'LWP', 5.12 );
      my $simple = $lwp_dist->class( 'LWP::Simple' );
      $single->get( $url );

 sub some_other_sub {
      my $lwp_dist = import( 'LWP', 4.45 );
      my $simple = $lwp_dist->class( 'LWP::Simple' );
      $single->get( $url );

I would then also be able to use two different versions in the same scope:

 sub some_other_sub {
      my $dbm_deep_123 = import( 'DBM::Deep', 1.23 );
      my $dbm_deep_223 = import( 'DBM::Deep', 2.23 );

      my $db_old = $dbm_deep_123->new( $file );
      my $db_new =  $dbm_deep_123->new( $new_file );

     ...copy the old to the new...;

But if I can do that, I can create truly anonymous classes without using a package name hack:

 my $class = ...some builtin...;

From there, maybe some of that Moosey stuff makes the stuff inside the class. Once I have the class, I just call methods on it:

 my $instance = $class->new(...);

I think this is probably in Perl 6 with the Mu stuff they added.

The third thing is the boring function signature thing that everyone wants.

I'm going to the Nordic Perl Workshop

The Nordic Perl Workshop is in Malmö on June 18-19. That's just across the bridge from Copenhagen and is quite a nice little city which I visited the last time I went to Copenhagen (or was it the time before that?).

I'm going to get there a little early though. I'm flying to Zurich so I can visit Liechtenstein the weekend before; I always want to visit but things get in the way. I'll be in Zurich on Sunday, June 12. I know a couple of Perl people must be there.

Once I do that, I'm flying up to Copenhagen on Monday, June 13. After that I have to find something to do with myse…

The Perl Community is great

The Perl community is a great group of people. chromatic and Andy Lester don't think so because they limit their involvement to the most toxic things man has ever created: the mailing list thread and website comments. There's nothing surprising about bad behavior in either of those places and it has nothing to do with Perl. It happens everywhere you find a mailing list or a comment section.

Show up to a Perl event with real people a…

The CPAN Air Force, 2011 QA Hackathon Day 2

What if a CPAN mirror wasn't stationary? How would we track it? Would people make Google Earth maps to show its path? Could we dynamically adjust capacity without additional servers? Would we have to get FAA approval?

Goodyear Blimp

Ricardo and I started talking about CPAN mirror data, mostly because Ricardo was rela…

2011 QA Workshop Day 0.5

I'm in Amsterdam now, the morning of the first day of the 2011 Perl QA Hackathon, and about to be pulled in by the black hole of Perl developers that is Booking.com. Curiously, this is the first trip in a long time that I haven't used Booking.com for my reservations.

Every year that I come to one of these workshops, my list of things to work on get longer and longer.

Last year I sketched out, with David Golden's help, a possible new CPAN client. We held off last…

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).