use Perl
All the Perl that's Practical to Extract and Report

Title    5.12 proposals
Date    2008.01.11 18:29
Author    brian_d_foy

Now that 5.10 is out, rjbs and I have fired off a bunch of proposals for 5.12 features to p5p. These are things which should be dead obvious, at least on the surface.

rjbs proposed...

Was I called as a method? A caller() extension so a routine can tell if it was called as a method or not.

Lexical named subroutines:

my sub foo {...}
to take over from

my $foo = sub { ... };
. Yes please, I'll take 10.

Anonymous packages: Yep, a namespace with no name.

I've proposed...

Named subroutine parameters:

sub foo ($this, $that) { ... }
Oh god please can we? The idea is to start simple and obvious and build out from there. Discussion is positive and lively. There's lots of small, but very important, details to work out.

method declaration:

method foo { return $self->{foo} }
No more my $self = shift;!


  1. "Was I called as a method?" -
  2. "Lexical named subroutines" -
  3. "Anonymous packages" -
  4. "Named subroutine parameters" -
  5. "method declaration" -

© Copyright 2012 - pudge, All Rights Reserved

printed from use Perl, 5.12 proposals on 2012-02-08 18:05:35