5.14
- after 5.8, we had to wait 5 years for 5.10
- 5.12 came out 2 years after 5.10
perlhist
5.14
- after 5.8, we had to wait 5 years for 5.10
- 5.12 came out 2 years after 5.10
- 5.14 came out 1 year after 5.12
perlhist
5.14
- after 5.8, we had to wait 5 years for 5.10
- 5.12 came out 2 years after 5.10
- 5.14 came out 1 year after 5.12
- 5.16 will come 1 year from 5.14
perlhist
5.14 is a Mixed Bag
- this talk isn’t just for beginners
perl5140delta
5.14 is a Mixed Bag
- this talk isn’t just for beginners
- some of these changes are at the edges
perl5140delta
5.14 is a Mixed Bag
- this talk isn’t just for beginners
- some of these changes are at the edges
- but they’re all practical
perl5140delta
5.14 is a Mixed Bag
- this talk isn’t just for beginners
- some of these changes are at the edges
- but they’re all practical
- except for the ones that aren’t
perl5140delta
By the way, 5.16...
- ...and beyond are going to be interesting
perl5150delta
By the way, 5.16...
- ...and beyond are going to be interesting
- stick around right here after the break and
hear Jesse “Double Pumpking” Vincent talk
about it
perl5150delta
...and 5.10 is EOL
- we accept critical bugfixes for 2 maint tracks
perlpolicy
...and 5.10 is EOL
- we accept critical bugfixes for 2 maint tracks
- that’s now 5.14 and 5.12
perlpolicy
...and 5.10 is EOL
- we accept critical bugfixes for 2 maint tracks
- that’s now 5.14 and 5.12
- we do security fixes for releases in last 3 years
perlpolicy
...and 5.10 is EOL
- we accept critical bugfixes for 2 maint tracks
- that’s now 5.14 and 5.12
- we do security fixes for releases in last 3 years
- 5.10 was 2007; it gets no promise of support
perlpolicy
...and 5.10 is EOL
- we accept critical bugfixes for 2 maint tracks
- that’s now 5.14 and 5.12
- we do security fixes for releases in last 3 years
- 5.10 was 2007; it gets no promise of support
- if you’re still on 5.8, you’re in the weeds
perlpolicy
First: A Warning
- 5.14 is backwards compatible
- but has some new behaviors
feature
First: A Warning
- 5.14 is backwards compatible
- but has some new behaviors
- they’re not all enabled by default; feature.pm
feature
First: A Warning
- 5.14 is backwards compatible
- but has some new behaviors
- they’re not all enabled by default; feature.pm
- no new feature.pm features in 5.14!
feature
First: A Warning
- 5.14 is backwards compatible
- but has some new behaviors
- they’re not all enabled by default; feature.pm
- no new feature.pm features in 5.14!
I’m a perldoc
ref!
feature
First: A Warning
- 5.14 is backwards compatible
- but has some new behaviors
- they’re not all enabled by default; feature.pm
- no new feature.pm features in 5.14!
feature
Stuff That’s Gone
- modules deprecated in 5.12 are gone in 5.14
- you’ll have to install them from CPAN
perlsyn
Stuff That’s Gone
- modules deprecated in 5.12 are gone in 5.14
- you’ll have to install them from CPAN
- do you care? no, because they are:
perlsyn
Stuff That’s Gone
- modules deprecated in 5.12 are gone in 5.14
- you’ll have to install them from CPAN
- do you care? no, because they are:
- Class::ISA
perlsyn
Stuff That’s Gone
- modules deprecated in 5.12 are gone in 5.14
- you’ll have to install them from CPAN
- do you care? no, because they are:
- Class::ISA
- Pod::Plainer
perlsyn
Stuff That’s Gone
- modules deprecated in 5.12 are gone in 5.14
- you’ll have to install them from CPAN
- do you care? no, because they are:
- Class::ISA
- Pod::Plainer
- Switch
perlsyn
New Regex Modifiers
/u - use Unicode rules
d matches BENGALI DIGIT FOUR
w matches LATIN SMALL LETTER ETH
perlre
New Regex Modifiers
/u - use Unicode rules
d matches BENGALI DIGIT FOUR
w matches LATIN SMALL LETTER ETH
“N{LATIN SMALL LIGATURE FF}” =~ /ff/ui
perlre
New Regex Modifiers
/a - Unicode, but ASCII rules for classes
d rejects BENGALI DIGIT FOUR
w rejects LATIN SMALL LETTER ETH
“N{LATIN SMALL LIGATURE FF}” =~ /ff/ai
perlre
New Regex Modifiers
/aa - Unicode, ASCII won’t match non-ASCII
d rejects BENGALI DIGIT FOUR
w rejects LATIN SMALL LETTER ETH
“N{LATIN SMALL LIGATURE FF}” !~ /ff/aai
perlre
New Regex Modifiers
/aa - Unicode, ASCII won’t match non-ASCII
d rejects BENGALI DIGIT FOUR
w rejects LATIN SMALL LETTER ETH
“N{LATIN SMALL LIGATURE FF}” !~ /ff/aai
“N{LATIN SMALL LIGATURE FF}” !~ /pL/aai
perlre
New Regex Modifiers
/d - default semantics
Use Unicode if it’s seems like it’s
maybe kinda unicode or the pattern
perlre
New Regex Modifiers
/d - default semantics
Use Unicode if it’s seems like it’s
maybe kinda unicode or the pattern
uses p or N{...}
perlre
New Regex Modifiers
/d - default semantics
Use Unicode if it’s seems like it’s
maybe kinda unicode or the pattern
uses p or N{...}
Otherwise, on ASCII systems use ASCII
perlre
New Regex Modifiers
/d - default semantics
Use Unicode if it’s seems like it’s
maybe kinda unicode or the pattern
uses p or N{...}
Otherwise, on ASCII systems use ASCII
Otherwise, on EBCDIC systems use Latin-1
perlre
New Regex Modifiers
/d - duhhhh-derrrrr semantics
Use Unicode if it’s seems like it’s
maybe kinda unicode or the pattern
uses p or N{...}
Otherwise, on ASCII systems use ASCII
Otherwise, on EBCDIC systems use Latin-1
perlre
New Regex Modifiers
# To be really ASCII-only:
die “funny un-American characters”
if $str =~ /[^x00-x7F]/;
$str =~ /...actual pattern.../;
perlre
What should I do??
- Learn as much as you can!
- Seriously!
- Decode user input, use /aa, use p_
- Consider: use re ‘/aa’
- But mostly: learn more.
perlunitut
More Unicode!
- “unicode_strings” feature is improved
- N{...} understands abbreviations
- ...and you can make your own
- better support for surrogates and non-
characters
perlunitut
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
values $arrayref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
values $arrayref
each $arrayref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
values $arrayref
each $arrayref
keys $hashref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
values $arrayref
each $arrayref
keys $hashref
values $hashref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift $arrayref
unshift $arrayref
splice $arrayref
keys $arrayref
values $arrayref
each $arrayref
keys $hashref
values $hashref
each $hashref
perlfunc
built-ins on references
push $arrayref
pop $arrayref
shift
AL
$arrayref
T
N
unshift $arrayref
keys
I E
splice $arrayref
M
$arrayref
P
each
ER
values $arrayref
$arrayref
EX
keys
each
$hashref
values $hashref
$hashref
perlfunc
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
die $tgz->{reason} unless $tgz->{success};
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
die $tgz->{reason} unless $tgz->{success};
open my $fh, ‘>’, $dist->{archive};
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
die $tgz->{reason} unless $tgz->{success};
open my $fh, ‘>’, $dist->{archive};
$fh->print( $tgz->{content} );
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
die $tgz->{reason} unless $tgz->{success};
open my $fh, ‘>’, $dist->{archive};
$fh->print( $tgz->{content} );
$fh->close;
JSON::PP
use 5.14.0;
use autodie;
use HTTP::Tiny;
use JSON::PP;
my $moose = ‘http://api.metacpan.org/release/Moose’;
my $http = HTTP::Tiny->new;
my $json = $http->get( $moose );
die $json->{reason} unless $json->{success};
my $dist = decode_json( $json );
my $tgz = $http->get( $json->{download_url} );
die $tgz->{reason} unless $tgz->{success};
open my $fh, ‘>’, $dist->{archive};
$fh->print( $tgz->{content} );
$fh->close;
IO::File
IO::File
open my $fh, ‘<’, $some_filename
or die “can’t open fh: $!”;
print {$fh} “Some output.”;
close $fh or die “can’t close fh: $!”;
perlopentut