$30 off During Our Annual Pro Sale. View Details »

Perl 5: Postcards from the Edge

Perl 5: Postcards from the Edge

Ricardo Signes

June 05, 2013
Tweet

More Decks by Ricardo Signes

Other Decks in Programming

Transcript

  1. Perl 5.18
    who cares?

    View Slide

  2. Perl 5
    postcards from the edge

    View Slide

  3. View Slide

  4. View Slide

  5. …perl was a mess…

    View Slide

  6. …but these days…

    View Slide

  7. …perl is a mess.

    View Slide

  8. View Slide

  9. We love our perl.

    View Slide

  10. We love our perl.
    It is a mess.

    View Slide

  11. We love our perl.
    It is a mess.
    Nobody is going to change that.

    View Slide

  12. We love our perl.
    It is a mess.
    Nobody is going to change that.
    So don't worry.

    View Slide

  13. View Slide

  14. What is new?

    View Slide

  15. What is new?
    Why is it new?

    View Slide

  16. What is new?
    Why is it new?
    What will be new next?

    View Slide

  17. What is new?
    Why is it new?
    What will be new next?
    What won't?

    View Slide

  18. What is new?
    Why is it new?
    What will be new next?
    What won't?
    Why?

    View Slide

  19. Perl 5.18
    who cares?

    View Slide

  20. - Renaming packages through glob assignment
    ("*Foo:: = *Bar::; *Bar:: = *Baz::") in
    combination with "m?...?" and "reset" no
    longer makes threaded builds crash.

    View Slide

  21. - If the hint hash %^H is tied...

    View Slide

  22. Regex Character Sets

    View Slide

  23. Regex Sets

    View Slide

  24. Regex Sets
    - regex have character sets:

    View Slide

  25. Regex Sets
    - regex have character sets:
    - $a =~ /[a-z]/

    View Slide

  26. Regex Sets
    - regex have character sets:
    - $a =~ /[a-z]/
    - but you can't do set operations

    View Slide

  27. Regex Sets
    - regex have character sets:
    - $a =~ /[a-z]/
    - but you can't do set operations
    - …except for addition

    View Slide

  28. Regex Sets

    View Slide

  29. $a =~ /[a-z]/
    Regex Sets

    View Slide

  30. $a =~ /[a-z]/
    $a =~ /[a-z0-9]/
    Regex Sets

    View Slide

  31. $a =~ /[a-z]/
    $a =~ /[a-z0-9]/
    $a =~ /[a-z0-9](?Regex Sets

    View Slide

  32. Regex Sets

    View Slide

  33. $a =~ /(?[
    Regex Sets

    View Slide

  34. $a =~ /(?[
    ( \pL
    Regex Sets

    View Slide

  35. $a =~ /(?[
    ( \pL
    + \pN
    Regex Sets

    View Slide

  36. $a =~ /(?[
    ( \pL
    + \pN
    - \p{Numeric_Value=3}
    Regex Sets

    View Slide

  37. $a =~ /(?[
    ( \pL
    + \pN
    - \p{Numeric_Value=3}
    )
    Regex Sets

    View Slide

  38. $a =~ /(?[
    ( \pL
    + \pN
    - \p{Numeric_Value=3}
    )
    & ( ! \p{Script=Cyrillic})
    Regex Sets

    View Slide

  39. $a =~ /(?[
    ( \pL
    + \pN
    - \p{Numeric_Value=3}
    )
    & ( ! \p{Script=Cyrillic})
    ])/
    Regex Sets

    View Slide

  40. no warnings 'experimental::regex_sets';
    $a =~ /(?[
    ( \pL
    + \pN
    - \p{Numeric_Value=3}
    )
    & ( ! \p{Script=Cyrillic})
    ])/
    Regex Sets

    View Slide

  41. Lexical Subroutines

    View Slide

  42. View Slide

  43. sub sum {

    View Slide

  44. sub sum {
    my $x = shift;

    View Slide

  45. sub sum {
    my $x = shift;
    my sub adder {

    View Slide

  46. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;

    View Slide

  47. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y

    View Slide

  48. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }

    View Slide

  49. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );

    View Slide

  50. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }

    View Slide

  51. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);

    View Slide

  52. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);
    sum(2,3);

    View Slide

  53. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);
    sum(2,3);
    sum(3,4);

    View Slide

  54. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);
    sum(2,3);
    sum(3,4);
    # 3

    View Slide

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

    View Slide

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

    View Slide

  57. sub sum {
    my $x = shift;
    state sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);
    sum(2,3);
    sum(3,4);

    View Slide

  58. sub sum {
    my $x = shift;
    state sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }
    sum(1,2);
    sum(2,3);
    sum(3,4);
    # 3 !?

    View Slide

  59. 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 !?

    View Slide

  60. 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 !?

    View Slide

  61. View Slide

  62. # ...some test file...

    View Slide

  63. # ...some test file...
    sub diag {

    View Slide

  64. # ...some test file...
    sub diag {
    say $_[0];

    View Slide

  65. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;

    View Slide

  66. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }

    View Slide

  67. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {

    View Slide

  68. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {

    View Slide

  69. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {
    ...; diag(“Just tested xyz!”);

    View Slide

  70. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {
    ...; diag(“Just tested xyz!”);
    }

    View Slide

  71. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {
    ...; diag(“Just tested xyz!”);
    }
    }

    View Slide

  72. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {
    ...; diag(“Just tested xyz!”);
    }
    }
    package Helper {

    View Slide

  73. # ...some test file...
    sub diag {
    say $_[0];
    emit_diagnostics;
    }
    package Tester {
    sub test_xyz {
    ...; diag(“Just tested xyz!”);
    }
    }
    package Helper {
    sub reticulate_splines {

    View Slide

  74. # ...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!”);

    View Slide

  75. # ...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!”);
    }

    View Slide

  76. # ...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!”);
    }
    }

    View Slide

  77. # ...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!”);
    }
    }

    View Slide

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

    View Slide

  79. # ...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!”);
    }
    }

    View Slide

  80. sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }

    View Slide

  81. View Slide

  82. use feature 'lexical_subs';

    View Slide

  83. use feature 'lexical_subs';
    sub sum {

    View Slide

  84. use feature 'lexical_subs';
    sub sum {
    my $x = shift;

    View Slide

  85. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {

    View Slide

  86. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;

    View Slide

  87. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y

    View Slide

  88. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }

    View Slide

  89. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );

    View Slide

  90. use feature 'lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }

    View Slide

  91. View Slide

  92. use feature 'lexical_subs';

    View Slide

  93. use feature 'lexical_subs';
    no warnings

    View Slide

  94. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';

    View Slide

  95. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {

    View Slide

  96. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;

    View Slide

  97. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {

    View Slide

  98. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;

    View Slide

  99. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y

    View Slide

  100. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }

    View Slide

  101. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );

    View Slide

  102. use feature 'lexical_subs';
    no warnings
    'experimental::lexical_subs';
    sub sum {
    my $x = shift;
    my sub adder {
    my ($y) = shift;
    $x + $y
    }
    adder( @_ );
    }

    View Slide

  103. Experimental Features

    View Slide

  104. Lexical Topic

    View Slide

  105. View Slide

  106. sub print_next {

    View Slide

  107. sub print_next {
    local $_ = shift;

    View Slide

  108. sub print_next {
    local $_ = shift;
    chomp;

    View Slide

  109. sub print_next {
    local $_ = shift;
    chomp;
    s/^\s+//;

    View Slide

  110. sub print_next {
    local $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;

    View Slide

  111. sub print_next {
    local $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;

    View Slide

  112. sub print_next {
    local $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;
    }

    View Slide

  113. sub print_next {
    my $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;
    }

    View Slide

  114. sub print_next {
    my $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;
    }

    View Slide

  115. sub print_next {
    my $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;
    }
    sub reset_stdout { ... }

    View Slide

  116. sub print_next {
    my $_ = shift;
    chomp;
    s/^\s+//;
    reset_stdout;
    print;
    }
    sub reset_stdout { ... }
    sub reset_stdout(_) { ... }

    View Slide

  117. View Slide

  118. sub reset_stdout {
    prep_for( length );
    }

    View Slide

  119. sub reset_stdout {
    prep_for( length );
    }
    sub reset_stdout (_) {
    prep_for( length );
    }

    View Slide

  120. use Try::Tiny;
    try {
    die "ignore";
    } catch {
    die $_ unless /ignore/;
    }

    View Slide

  121. use Try::Tiny;
    my $_ = "ho ho ho";
    try {
    die "ignore";
    } catch {
    die $_ unless /ignore/;
    }

    View Slide

  122. use Try::Tiny;
    my $_ = "ho ho ho";
    try {
    die "ignore";
    } catch sub (_) {
    die $_[0] unless $_[0] =~ /ignore/;
    }

    View Slide

  123. use Try::Tiny;
    my $_ = "ho ho ho";
    try {
    die "ignore";
    } catch {
    die $::_ unless $::_ =~ /ignore/;
    }

    View Slide

  124. Smrt Match

    View Slide

  125. Let's Not…
    …and say we did.

    View Slide

  126. View Slide

  127. $a $b Meaning
    ======= ======= ===============
    Any undef ! defined $a
    Any ~~-overloaded ~~ overloading
    Any Regexp, qr-ol $a =~ $b
    Any CodeRef, &{}-ol $b->($a)
    Any Any fatal

    View Slide

  128. $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
    }

    View Slide

  129. given ($x) {
    when ($y) {
    ...
    ...
    }
    }

    View Slide

  130. View Slide

  131. use Try::Tiny;

    View Slide

  132. use Try::Tiny;
    given ($x) {

    View Slide

  133. use Try::Tiny;
    given ($x) {
    when ($y) {

    View Slide

  134. use Try::Tiny;
    given ($x) {
    when ($y) {
    try { ... }

    View Slide

  135. use Try::Tiny;
    given ($x) {
    when ($y) {
    try { ... }
    catch { die if /fatal/ };

    View Slide

  136. use Try::Tiny;
    given ($x) {
    when ($y) {
    try { ... }
    catch { die if /fatal/ };
    }

    View Slide

  137. use Try::Tiny;
    given ($x) {
    when ($y) {
    try { ... }
    catch { die if /fatal/ };
    }
    }

    View Slide

  138. Hash Randomization

    View Slide

  139. "Common" Knowledge

    View Slide

  140. ~$ perl -E <"Common" Knowledge

    View Slide

  141. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    "Common" Knowledge

    View Slide

  142. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    %h2 = %h1;
    "Common" Knowledge

    View Slide

  143. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    %h2 = %h1;
    say %h1; say %h2
    "Common" Knowledge

    View Slide

  144. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    "Common" Knowledge

    View Slide

  145. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    1234
    "Common" Knowledge

    View Slide

  146. ~$ perl -E <%h1 = (1 => 2, 3 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    1234
    1234
    "Common" Knowledge

    View Slide

  147. "Common" Knowledge

    View Slide

  148. ~$ perl -E <"Common" Knowledge

    View Slide

  149. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    "Common" Knowledge

    View Slide

  150. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    "Common" Knowledge

    View Slide

  151. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    "Common" Knowledge

    View Slide

  152. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    "Common" Knowledge

    View Slide

  153. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    334112
    "Common" Knowledge

    View Slide

  154. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    334112
    112334
    "Common" Knowledge

    View Slide

  155. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    334112
    "Common" Knowledge

    View Slide

  156. ~$ perl -E <%h1 = (11 => 2, 33 => 4);
    %h2 = %h1;
    say %h1; say %h2
    END
    334112
    112334
    "Common" Knowledge

    View Slide

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

    View Slide

  158. (?{…}) and (??{…})

    View Slide

  159. split

    View Slide

  160. View Slide

  161. $x = "␠␠␠x␠␠y␠␠␠␠z";

    View Slide

  162. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)

    View Slide

  163. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)
    $y = '␠';

    View Slide

  164. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)
    $y = '␠';
    split $y, $x; # ('␠') x 3,

    View Slide

  165. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)
    $y = '␠';
    split $y, $x; # ('␠') x 3,
    # x, '␠', y

    View Slide

  166. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)
    $y = '␠';
    split $y, $x; # ('␠') x 3,
    # x, '␠', y
    # ('␠') x 3,

    View Slide

  167. $x = "␠␠␠x␠␠y␠␠␠␠z";
    split '␠', $x; # (x, y, z)
    $y = '␠';
    split $y, $x; # ('␠') x 3,
    # x, '␠', y
    # ('␠') x 3,
    # z

    View Slide

  168. Fond Farewells

    View Slide

  169. Fond Farewells
    - File::CheckTree
    - Text::SoundEx
    - Pod::LaTeX
    - CPANPLUS

    View Slide

  170. Perl5

    View Slide

  171. 7
    7
    Perl

    View Slide

  172. Perl5

    View Slide

  173. Perl5S

    View Slide

  174. Perl 5s

    View Slide

  175. View Slide

  176. View Slide

  177. View Slide

  178. View Slide

  179. View Slide

  180. View Slide

  181. Why I ♥ Turban Squash

    View Slide

  182. Why I ♥ Turban Squash
    - it's like an experimental feature

    View Slide

  183. Why I ♥ Turban Squash
    - it's like an experimental feature
    - you start with perl

    View Slide

  184. Why I ♥ Turban Squash
    - it's like an experimental feature
    - you start with perl
    - then break it

    View Slide

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

    View Slide

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

    View Slide

  187. Perl5

    View Slide

  188. Perl5

    View Slide

  189. Τί ἐστιν Περλ;

    View Slide

  190. Τί ἐστιν Περλ;
    - "Perl should get more Perlish."

    View Slide

  191. Τί ἐστιν Περλ;
    - "Perl should get more Perlish."
    - What?

    View Slide

  192. Τί ἐστιν Περλ;
    - "Perl should get more Perlish."
    - What?
    - Perl is a whole made of parts that work
    together nicely.

    View Slide

  193. Τί ἐστιν Περλ;
    - "Perl should get more Perlish."
    - What?
    - Perl is a whole made of parts that work
    together nicely.
    - (pause for laughter)

    View Slide

  194. Τί ἐστιν Περλ;
    - teachable
    - guessable
    - extensible
    - compatible

    View Slide

  195. View Slide

  196. OH SNAP

    View Slide

  197. View Slide

  198. BACKCOMPAT

    View Slide

  199. Backcompat Killed My Dog
    - "We should break horrible old features to
    allow evolution."
    - "We don't make change because of
    backcompat."

    View Slide

  200. Success hates agility.

    View Slide

  201. - "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

    View Slide

  202. - "We all agree on [removing cruft]. We just
    can't agree on [what cruft] to [remove]."
    — [Larry]
    Backcompat Killed My Dog

    View Slide

  203. Backcompat has prevented
    very, very few real patches
    from landing.

    View Slide

  204. How many patches have
    not been written because
    of backcompat concerns?

    View Slide

  205. How many patches have
    been "discussed" until
    they don't happen?

    View Slide

  206. Some

    View Slide

  207. Talked To Death

    View Slide

  208. Talked To Death
    - maybe we figure out that it was a bad idea

    View Slide

  209. Talked To Death
    - maybe we figure out that it was a bad idea
    - maybe the perfect is the enemy of the good

    View Slide

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

    View Slide

  211. View Slide

  212. how to deprecate:
    step 1. have a huge flame-war
    on p5p mailing list

    View Slide

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

    View Slide

  214. - "We all agree on the necessity of
    compromise. We just can't agree on when it's
    necessary to compromise." — Larry
    Talked to Death

    View Slide

  215. - "We all agree on the necessity of
    compromise. [Ricardo can] agree on when it's
    necessary to compromise." — [Ricardo]
    Talked to Death

    View Slide

  216. Perl Needs Hackers

    View Slide

  217. Daddy, where do
    patches come from?

    View Slide

  218. View Slide

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

    View Slide

  220. View Slide

  221. - If you want a feature…

    View Slide

  222. - If you want a feature…
    - …write it!

    View Slide

  223. - If you want a feature…
    - …write it!
    - If you don't know how…

    View Slide

  224. - If you want a feature…
    - …write it!
    - If you don't know how…
    - ask for help.

    View Slide

  225. - If you want a feature…
    - …write it!
    - If you don't know how…
    - ask for help.
    - If you don't want to write it…

    View Slide

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

    View Slide

  227. Perl Hackers Need Code Review

    View Slide

  228. View Slide

  229. View Slide

  230. My Hopes and Dreams

    View Slide

  231. fatal implicit close()

    View Slide

  232. fatal implicit close()

    View Slide

  233. {
    fatal implicit close()

    View Slide

  234. {
    use autodie;
    fatal implicit close()

    View Slide

  235. {
    use autodie;
    open my $fh, ‘>’, $filename;
    fatal implicit close()

    View Slide

  236. {
    use autodie;
    open my $fh, ‘>’, $filename;
    $fh->print( ... );
    fatal implicit close()

    View Slide

  237. {
    use autodie;
    open my $fh, ‘>’, $filename;
    $fh->print( ... );
    } # should die if close fails!
    fatal implicit close()

    View Slide

  238. postfix dereferencing

    View Slide

  239. View Slide

  240. push @{ $x->{foo}->[0]->m }, $y;

    View Slide

  241. push @{ $x->{foo}->[0]->m }, $y;
    push $x->{foo}->[0]->m , $y;

    View Slide

  242. push @{ $x->{foo}->[0]->m }, $y;
    push $x->{foo}->[0]->m , $y;
    push $x->{foo}->[0]->m->@*, $y;

    View Slide

  243. push @{ $x->{foo}->[0]->m }, $y;
    push $x->{foo}->[0]->m , $y;
    push $x->{foo}->[0]->m->@*, $y;
    push @y, @{ $x->{foo}->[0]->m };

    View Slide

  244. push @{ $x->{foo}->[0]->m }, $y;
    push $x->{foo}->[0]->m , $y;
    push $x->{foo}->[0]->m->@*, $y;
    push @y, @{ $x->{foo}->[0]->m };
    push @y, $x->{foo}->[0]->m->@*;

    View Slide

  245. View Slide

  246. print ${ $x->body_ref };

    View Slide

  247. print ${ $x->body_ref };
    print $x->body_ref->$*;

    View Slide

  248. print ${ $x->body_ref };
    print $x->body_ref->$*;
    $x = \*Package::ISA;

    View Slide

  249. print ${ $x->body_ref };
    print $x->body_ref->$*;
    $x = \*Package::ISA;
    $x->**->@*; # ...maybe not...

    View Slide

  250. better exceptions

    View Slide

  251. my $x = try {
    $y / $z
    } catch {
    return $Infinity
    if $_->tagged(‘divbyzero’);
    die $_;
    }
    better exceptions

    View Slide

  252. better types

    View Slide

  253. chars v. bytes

    View Slide

  254. my $buf = $fh->readline;
    chars v. bytes

    View Slide

  255. my $buf = $fh->readline;
    my $str = decode_utf8($buf);
    chars v. bytes

    View Slide

  256. my $buf = $fh->readline;
    my $str = decode_utf8($buf);
    STDOUT->print( $str );
    chars v. bytes

    View Slide

  257. my $buf = $fh->readline;
    my $str = decode_utf8($buf);
    STDOUT->print( $str );
    # fatal unless encoding layer
    chars v. bytes

    View Slide

  258. autoboxing

    View Slide

  259. autoboxing

    View Slide

  260. @array->push(@list);
    autoboxing

    View Slide

  261. @array->push(@list);
    $arrayref->push(@list);
    autoboxing

    View Slide

  262. @array->push(@list);
    $arrayref->push(@list);
    for ($x->values) { ... }
    autoboxing

    View Slide

  263. magic MRO

    View Slide

  264. Any questions?

    View Slide

  265. Thank you!

    View Slide