We love our perl.
It is a mess.
Nobody is going to change that.
Slide 12
Slide 12 text
We love our perl.
It is a mess.
Nobody is going to change that.
So don't worry.
Slide 13
Slide 13 text
No content
Slide 14
Slide 14 text
What is new?
Slide 15
Slide 15 text
What is new?
Why is it new?
Slide 16
Slide 16 text
What is new?
Why is it new?
What will be new next?
Slide 17
Slide 17 text
What is new?
Why is it new?
What will be new next?
What won't?
Slide 18
Slide 18 text
What is new?
Why is it new?
What will be new next?
What won't?
Why?
Slide 19
Slide 19 text
Perl 5.18
who cares?
Slide 20
Slide 20 text
- Renaming packages through glob assignment
("*Foo:: = *Bar::; *Bar:: = *Baz::") in
combination with "m?...?" and "reset" no
longer makes threaded builds crash.
Slide 21
Slide 21 text
- If the hint hash %^H is tied...
Slide 22
Slide 22 text
Regex Character Sets
Slide 23
Slide 23 text
Regex Sets
Slide 24
Slide 24 text
Regex Sets
- regex have character sets:
Slide 25
Slide 25 text
Regex Sets
- regex have character sets:
- $a =~ /[a-z]/
Slide 26
Slide 26 text
Regex Sets
- regex have character sets:
- $a =~ /[a-z]/
- but you can't do set operations
Slide 27
Slide 27 text
Regex Sets
- regex have character sets:
- $a =~ /[a-z]/
- but you can't do set operations
- …except for addition
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
Slide 47
Slide 47 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
Slide 48
Slide 48 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
Slide 49
Slide 49 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
Slide 50
Slide 50 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
Slide 51
Slide 51 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
Slide 52
Slide 52 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
Slide 53
Slide 53 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
Slide 54
Slide 54 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3
Slide 55
Slide 55 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3
# 5
Slide 56
Slide 56 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3
# 5
# 7
Slide 57
Slide 57 text
sub sum {
my $x = shift;
state sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
Slide 58
Slide 58 text
sub sum {
my $x = shift;
state sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3 !?
Slide 59
Slide 59 text
sub sum {
my $x = shift;
state sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3 !?
# 4 !?
Slide 60
Slide 60 text
sub sum {
my $x = shift;
state sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
sum(1,2);
sum(2,3);
sum(3,4);
# 3 !?
# 4 !?
# 5 !?
Slide 61
Slide 61 text
No content
Slide 62
Slide 62 text
# ...some test file...
Slide 63
Slide 63 text
# ...some test file...
sub diag {
Slide 64
Slide 64 text
# ...some test file...
sub diag {
say $_[0];
Slide 65
Slide 65 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
Slide 66
Slide 66 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
Slide 67
Slide 67 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
Slide 68
Slide 68 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
Slide 69
Slide 69 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
Slide 70
Slide 70 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
Slide 71
Slide 71 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
Slide 72
Slide 72 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
Slide 73
Slide 73 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
Slide 74
Slide 74 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
...; diag(“Reticulated!”);
Slide 75
Slide 75 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
...; diag(“Reticulated!”);
}
Slide 76
Slide 76 text
# ...some test file...
sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
...; diag(“Reticulated!”);
}
}
Slide 77
Slide 77 text
# ...some test file...
my sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
...; diag(“Reticulated!”);
}
}
Slide 78
Slide 78 text
Some bad thing happened at file.p5 line 12.
main::emit_diagnostics(...) called at file.p5 line 10
(unknown)(3, 4) called at file.p5 line 9
Tester::test_xyz() called at file.p5 line 15
Slide 79
Slide 79 text
# ...some test file...
our sub diag {
say $_[0];
emit_diagnostics;
}
package Tester {
sub test_xyz {
...; diag(“Just tested xyz!”);
}
}
package Helper {
sub reticulate_splines {
...; diag(“Reticulated!”);
}
}
Slide 80
Slide 80 text
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
Slide 81
Slide 81 text
No content
Slide 82
Slide 82 text
use feature 'lexical_subs';
Slide 83
Slide 83 text
use feature 'lexical_subs';
sub sum {
Slide 84
Slide 84 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
Slide 85
Slide 85 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
Slide 86
Slide 86 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
Slide 87
Slide 87 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
Slide 88
Slide 88 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
Slide 89
Slide 89 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
Slide 90
Slide 90 text
use feature 'lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
Slide 91
Slide 91 text
No content
Slide 92
Slide 92 text
use feature 'lexical_subs';
Slide 93
Slide 93 text
use feature 'lexical_subs';
no warnings
Slide 94
Slide 94 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
Slide 95
Slide 95 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
Slide 96
Slide 96 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
Slide 97
Slide 97 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
Slide 98
Slide 98 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
Slide 99
Slide 99 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
Slide 100
Slide 100 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
Slide 101
Slide 101 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
Slide 102
Slide 102 text
use feature 'lexical_subs';
no warnings
'experimental::lexical_subs';
sub sum {
my $x = shift;
my sub adder {
my ($y) = shift;
$x + $y
}
adder( @_ );
}
Slide 103
Slide 103 text
Experimental Features
Slide 104
Slide 104 text
Lexical Topic
Slide 105
Slide 105 text
No content
Slide 106
Slide 106 text
sub print_next {
Slide 107
Slide 107 text
sub print_next {
local $_ = shift;
Slide 108
Slide 108 text
sub print_next {
local $_ = shift;
chomp;
Slide 109
Slide 109 text
sub print_next {
local $_ = shift;
chomp;
s/^\s+//;
Slide 110
Slide 110 text
sub print_next {
local $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
Slide 111
Slide 111 text
sub print_next {
local $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
Slide 112
Slide 112 text
sub print_next {
local $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
}
Slide 113
Slide 113 text
sub print_next {
my $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
}
Slide 114
Slide 114 text
sub print_next {
my $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
}
Slide 115
Slide 115 text
sub print_next {
my $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
}
sub reset_stdout { ... }
Slide 116
Slide 116 text
sub print_next {
my $_ = shift;
chomp;
s/^\s+//;
reset_stdout;
print;
}
sub reset_stdout { ... }
sub reset_stdout(_) { ... }
Slide 117
Slide 117 text
No content
Slide 118
Slide 118 text
sub reset_stdout {
prep_for( length );
}
Slide 119
Slide 119 text
sub reset_stdout {
prep_for( length );
}
sub reset_stdout (_) {
prep_for( length );
}
Slide 120
Slide 120 text
use Try::Tiny;
try {
die "ignore";
} catch {
die $_ unless /ignore/;
}
Slide 121
Slide 121 text
use Try::Tiny;
my $_ = "ho ho ho";
try {
die "ignore";
} catch {
die $_ unless /ignore/;
}
Slide 122
Slide 122 text
use Try::Tiny;
my $_ = "ho ho ho";
try {
die "ignore";
} catch sub (_) {
die $_[0] unless $_[0] =~ /ignore/;
}
Slide 123
Slide 123 text
use Try::Tiny;
my $_ = "ho ho ho";
try {
die "ignore";
} catch {
die $::_ unless $::_ =~ /ignore/;
}
Slide 124
Slide 124 text
Smrt Match
Slide 125
Slide 125 text
Let's Not…
…and say we did.
Slide 126
Slide 126 text
No content
Slide 127
Slide 127 text
$a $b Meaning
======= ======= ===============
Any undef ! defined $a
Any ~~-overloaded ~~ overloading
Any Regexp, qr-ol $a =~ $b
Any CodeRef, &{}-ol $b->($a)
Any Any fatal
Slide 128
Slide 128 text
$a $b Meaning
======= ======= ===============
Any undef ! defined $a
Any ~~-overloaded ~~ overloading
Any Regexp, qr-ol $a =~ $b
Any CodeRef, &{}-ol $b->($a)
Any Any fatal
given ($x) {
when ($y) { ... } # $x ~~ $y
when (4) { ... } # $x == 4
when (‘4’) { ... } # $x eq 4
}
Slide 129
Slide 129 text
given ($x) {
when ($y) {
...
...
}
}
Slide 130
Slide 130 text
No content
Slide 131
Slide 131 text
use Try::Tiny;
Slide 132
Slide 132 text
use Try::Tiny;
given ($x) {
Slide 133
Slide 133 text
use Try::Tiny;
given ($x) {
when ($y) {
Slide 134
Slide 134 text
use Try::Tiny;
given ($x) {
when ($y) {
try { ... }
Slide 135
Slide 135 text
use Try::Tiny;
given ($x) {
when ($y) {
try { ... }
catch { die if /fatal/ };
Slide 136
Slide 136 text
use Try::Tiny;
given ($x) {
when ($y) {
try { ... }
catch { die if /fatal/ };
}
Slide 137
Slide 137 text
use Try::Tiny;
given ($x) {
when ($y) {
try { ... }
catch { die if /fatal/ };
}
}
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
"Common" Knowledge
Slide 152
Slide 152 text
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
END
"Common" Knowledge
Slide 153
Slide 153 text
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
END
334112
"Common" Knowledge
Slide 154
Slide 154 text
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
END
334112
112334
"Common" Knowledge
Slide 155
Slide 155 text
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
END
334112
"Common" Knowledge
Slide 156
Slide 156 text
~$ perl -E < 2, 33 => 4);
%h2 = %h1;
say %h1; say %h2
END
334112
112334
"Common" Knowledge
Slide 157
Slide 157 text
Just Remember…
- keys %hash and values %hash are in
the same order as each other
- they both change if you alter the hash
- so does each and list order
Why I ♥ Turban Squash
- it's like an experimental feature
Slide 183
Slide 183 text
Why I ♥ Turban Squash
- it's like an experimental feature
- you start with perl
Slide 184
Slide 184 text
Why I ♥ Turban Squash
- it's like an experimental feature
- you start with perl
- then break it
Slide 185
Slide 185 text
Why I ♥ Turban Squash
- it's like an experimental feature
- you start with perl
- then break it
- see how much you broke, how much you win
Slide 186
Slide 186 text
Why I ♥ Turban Squash
- it's like an experimental feature
- you start with perl
- then break it
- see how much you broke, how much you win
- and then I can steal your work from you
Slide 187
Slide 187 text
Perl5
Slide 188
Slide 188 text
Perl5
Slide 189
Slide 189 text
Τί ἐστιν Περλ;
Slide 190
Slide 190 text
Τί ἐστιν Περλ;
- "Perl should get more Perlish."
Slide 191
Slide 191 text
Τί ἐστιν Περλ;
- "Perl should get more Perlish."
- What?
Slide 192
Slide 192 text
Τί ἐστιν Περλ;
- "Perl should get more Perlish."
- What?
- Perl is a whole made of parts that work
together nicely.
Slide 193
Slide 193 text
Τί ἐστιν Περλ;
- "Perl should get more Perlish."
- What?
- Perl is a whole made of parts that work
together nicely.
- (pause for laughter)
Backcompat Killed My Dog
- "We should break horrible old features to
allow evolution."
- "We don't make change because of
backcompat."
Slide 200
Slide 200 text
Success hates agility.
Slide 201
Slide 201 text
- "We all agree on the necessity of
compromise. We just can't agree on when it's
necessary to compromise." — Larry
Backcompat Killed My Dog
Slide 202
Slide 202 text
- "We all agree on [removing cruft]. We just
can't agree on [what cruft] to [remove]."
— [Larry]
Backcompat Killed My Dog
Slide 203
Slide 203 text
Backcompat has prevented
very, very few real patches
from landing.
Slide 204
Slide 204 text
How many patches have
not been written because
of backcompat concerns?
Slide 205
Slide 205 text
How many patches have
been "discussed" until
they don't happen?
Slide 206
Slide 206 text
Some
Slide 207
Slide 207 text
Talked To Death
Slide 208
Slide 208 text
Talked To Death
- maybe we figure out that it was a bad idea
Slide 209
Slide 209 text
Talked To Death
- maybe we figure out that it was a bad idea
- maybe the perfect is the enemy of the good
Slide 210
Slide 210 text
Talked To Death
- maybe we figure out that it was a bad idea
- maybe the perfect is the enemy of the good
- maybe nobody's willing to decide the debate
Slide 211
Slide 211 text
No content
Slide 212
Slide 212 text
how to deprecate:
step 1. have a huge flame-war
on p5p mailing list
Slide 213
Slide 213 text
how to deprecate:
step 1. have a huge flame-war
on p5p mailing list
step 2. after no
conclusive result on the
mailing list, deprecate anyway
Slide 214
Slide 214 text
- "We all agree on the necessity of
compromise. We just can't agree on when it's
necessary to compromise." — Larry
Talked to Death
Slide 215
Slide 215 text
- "We all agree on the necessity of
compromise. [Ricardo can] agree on when it's
necessary to compromise." — [Ricardo]
Talked to Death
Slide 216
Slide 216 text
Perl Needs Hackers
Slide 217
Slide 217 text
Daddy, where do
patches come from?
Slide 218
Slide 218 text
No content
Slide 219
Slide 219 text
- most of our patches come from four people
- Perl is not dead
- but perl5.git is on life support
- but: everybody in this room is a doctor
Slide 220
Slide 220 text
No content
Slide 221
Slide 221 text
- If you want a feature…
Slide 222
Slide 222 text
- If you want a feature…
- …write it!
Slide 223
Slide 223 text
- If you want a feature…
- …write it!
- If you don't know how…
Slide 224
Slide 224 text
- If you want a feature…
- …write it!
- If you don't know how…
- ask for help.
Slide 225
Slide 225 text
- If you want a feature…
- …write it!
- If you don't know how…
- ask for help.
- If you don't want to write it…
Slide 226
Slide 226 text
- If you want a feature…
- …write it!
- If you don't know how…
- ask for help.
- If you don't want to write it…
- discuss with p5p how it might help.
Slide 227
Slide 227 text
Perl Hackers Need Code Review
Slide 228
Slide 228 text
No content
Slide 229
Slide 229 text
No content
Slide 230
Slide 230 text
My Hopes and Dreams
Slide 231
Slide 231 text
fatal implicit close()
Slide 232
Slide 232 text
fatal implicit close()
Slide 233
Slide 233 text
{
fatal implicit close()
Slide 234
Slide 234 text
{
use autodie;
fatal implicit close()
Slide 235
Slide 235 text
{
use autodie;
open my $fh, ‘>’, $filename;
fatal implicit close()
Slide 236
Slide 236 text
{
use autodie;
open my $fh, ‘>’, $filename;
$fh->print( ... );
fatal implicit close()
Slide 237
Slide 237 text
{
use autodie;
open my $fh, ‘>’, $filename;
$fh->print( ... );
} # should die if close fails!
fatal implicit close()