• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
What's new in Perl 5.14
 

What's new in Perl 5.14

on

  • 5,699 views

An overview of new features appeared in the version 5.14 of the Perl programming language.

An overview of new features appeared in the version 5.14 of the Perl programming language.

Statistics

Views

Total Views
5,699
Views on SlideShare
4,576
Embed Views
1,123

Actions

Likes
1
Downloads
28
Comments
0

8 Embeds 1,123

http://blogs.perl.org 1104
http://quantablurp.blogspot.com 9
http://www.techgig.com 5
http://static.slidesharecdn.com 1
http://127.0.0.1:8795 1
http://xss.yandex.net 1
http://orhowilearnedtolovetheperl.com 1
http://a0.twimg.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    What's new in Perl 5.14 What's new in Perl 5.14 Presentation Transcript

    • Whats newin Perl 5.14
    • perldoc perlhist
    • 5.10.02007−Dec−18
    • 5.10 appearedat its 20th birthday
    • ¿Are you using Perl >= 5.10? — Ta k e p a rt in ou r su r ve y !
    • saywas introduced
    • ¿Are you using say ?
    • Seriously
    • The New History Began with
    • Modern Perl
    • Modern Perl
    • Modern Perl
    • Modern Perl termis often understood too widely
    • But its just NOT these
    • Thats from a bookpublished in 2009
    • OK, go further:perldoc perlhist
    • well skip all odd (not even) versions (5.11, 5.13) — they are odd dev
    • 5.12.02010−Apr−12
    • ¿Are you using Perl >= 5.12? — What i s YAPC?
    • 5.14.0RC12011−Apr−20
    • RC — is arelease candidate
    • Then was RC2
    • And thenRC3
    • Well, Perl 6s wayis much longer
    • Perl 5.14is ready already
    • Whats newin Perl 5.14?
    • perldoc perldelta
    • perldelta == 5.14 – 5.12
    • NoticeAs described in perlpolicy, therelease of Perl 5.14.0 marks theofficial end of support for Perl5.10. Users of Perl 5.10 or earliershould consider upgrading to amore recent release of Perl.
    • Frankly speaking,its not that easy toupdate Perls versionon existing machine
    • Modules are themost difficult part
    • Do you know how to reinstalleverything easily?
    • New
    • 1Syntax
    • 2Security
    • Remember...
    • register_globals = off $_GET["sql"] In PHPsince version 4.2.0
    • Perl is secure by itself
    • 3Incompatibilities
    • 4Deprecations
    • 5Performance
    • 6 Modulesand pragmas
    • 7Documentation
    • 8Diagnostics
    • 9Utilities
    • 10Install process
    • 11Platforms
    • 12Internals
    • 13Bug fixes
    • 14Опечатки
    • Well only take a look at syntax andregular expressions changes
    • (Well, its time toWelcome, Perl 6.0!)
    • Unicode affects bothstrings and regexes
    • A bell(fairy tale)
    • ASCII-character BELL (0x7)
    • In Unicode 6.0BELL — 0x1F514
    • Panic!
    • Perl is calm and wise
    • Perl is calm and wise. . . probably
    • In PerlBELL  =  0x0007
    • In Perl BELL  =  0x0007N{BELL}  =  0x0007
    • In Perl BELL  =  0x0007N{BELL}  =  0x0007 0x0007  =  ALERT
    • BELL  =  0x0007N{BELL}  =  0x0007 0x0007  =  ALERT ALERT  =  "a"
    • BELL  =  0x0007N{BELL}  =  0x0007 0x0007  =  ALERT ALERT  =  "a"N{BEL}  =  0x0007
    • BELL  =  0x0007N{BELL}  =  0x0007 0x0007  =  ALERT ALERT  =  "a"N{BEL}  =  0x0007 0x1F514  —  no name
    • 0x0007  =  ALERT ALERT  =  "a" N{BEL}  =  0x0007 0x1F514  —  no name 0x1F514  =              N{U+1F514}
    • 0x1F514  —  no name 0x1F514  =              N{U+1F514} Plans for Perl 5.16 N{BELL}  =  0x1F514
    •            N{U+1F514} Plans for Perl 5.16 N{BELL}  =  0x1F514 replace existing N{BELL} with  N{ALERT}, N{BEL}  or  "a"
    • use  feature  unicode_strings;
    • It brings the hope
    • That everything is in Unicode
    • How to turn 5.14 on
    • use v5.14;
    • use strict; adds itselfbehind the scene
    • 5.10.0 v5.10.0 v5.10vector stringversion stringabbreviated — v-string
    • Whats new inregular expressions
    • (?^  .  .  .)
    • Switch off all themodifiers locally
    • "ABC"  =~  /abc/i; True
    • "ABC"  =~  /a(?^:b)c/i; False
    • "ABC"  =~  /a(?^i:b)c/i; True
    • Ingenious reason
    • $  perl5.14.0  -­‐MData::Dumper  -­‐Emy  $x  =  qr/abc/;  say  Dumper($x)$VAR1  =  qr/(?^u:abc)/; No changes after adding new modifiers to Perl
    • $  perl5.10.0  -­‐MData::Dumper  -­‐Emy  $x  =  qr/abc/;  say  Dumper($x)$VAR1  =  qr/(?-­‐xism:abc)/; Will be changed after adding new modifiers to Perl
    • New modifiers
    • /l ==use  locale;
    • /u == use  feature  unicode_strings;
    • /d ~~ no  locale; no  feature  unicode_strings;
    • by lt de fau /d ~~ no  locale; no  feature  unicode_strings;
    • /a
    • How many characters match with /d/
    • How many characters match with /d/ ±420
    • for  (0x0  ..  0x10FFFF)  {        my  $char  =  chr($_);        say  $char                if  $char  =~  /^d$/;}
    • /d/ matches any symbolmarked DIGIT in Unicode
    • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,٠ ٩ ,٨ ,٧ ,٦ ,٥ ,٤ ,٣ ,٢ ,١, ੦,੧, ੨, ੩, ੪, ੫, ੬, ੭, ੮, ੯, ૦, ૧,૨, ૩, ૪, ૫, ૬, ૭, ૮, ૯, ௦, ௧, ௨, ௩, ௪, ௫, ௬, ௭, ௮, ௯, ...
    • d becamea topic of arguments
    • /ds behaviour is stable,but contradictory d
    • Welcome /a
    • for  (0x0  ..  0x10FFFF)  {        my  $char  =  chr($_);        say  $char                if  $char  =~  /^d$/a;}
    • Only 10 ASCII characters match$  perl  a1.pl  |  wc  -­‐l10
    • /a creates ASCII versionsof the modifiers d, s и w
    • And affects both b and B
    • /r
    • Non-destructive substitution
    • A substitutionthat do not change original string
    • use  v5.14;my  $version  =  "Perl  5.10";say  $version  =~  s/5.10/5.14/r;  Result: Perl  5.14
    • my $english = "colour";my $american = $english =~ s/our/or/r;
    • Arrays and hashes
    • Extra noise chars to be removed
    • That featureis experimental
    • use  v5.14;my  $a  =  [];push  $a,  3,  5,  7;
    • use  v5.10;my  $a  =  [];push  @$a,  3,  5,  7;
    • (Likewise @a[1] in Perl 6)
    • And more
    • push/pop  @$arrayrefpush/pop  $arrayref
    • shift/unshift  @$arrayrefshift/unshift  $arrayref
    • splice  @$arrayrefsplice  $arrayref
    • keys/values  %$hashrefkeys/values  $hashref
    • keys/values  @$arrayrefkeys/values  $arrayref
    • each  %$href  /  @$aref each  $href  /  $aref
    • given returns the lastevaluated value
    • say  mysub(7);sub  mysub  {        given($_[0])  {              "few"    when  3;              "OK"      when  5;              "many"  when  7;              "?";        }}
    • (For those who omitreturn keyword)
    • git blame
    • Aaron Crane, Abhijit Menon-Sen, Abigail, Ævar Arnfjörð Bjarmason, Alastair Douglas, AlexanderAlekseev, Alexander Hartmaier, Alexandr Ciornii, Alex Davies, Alex Vandiver, Ali Polatel, Allen Smith,Andreas König, Andrew Rodland, Andy Armstrong, Andy Dougherty, Aristotle Pagaltzis, Arkturuz,Arvan, A. Sinan Unur, Ben Morrow, Bo Lindbergh, Boris Ratner, Brad Gilbert, Bram, brian d foy, BrianPhillips, Casey West, Charles Bailey, Chas. Owens, Chip Salzenberg, Chris BinGOs Williams,chromatic, Craig A. Berry, Curtis Jewell, Dagfinn Ilmari Mannsåker, Dan Dascalescu, Dave Rolsky,David Caldwell, David Cantrell, David Golden, David Leadbeater, David Mitchell, David Wheeler, EricBrine, Father Chrysostomos, Fingle Nark, Florian Ragwitz, Frank Wiegand, Franz Fasching, GeneSullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Grant McLean, gregor herrmann,H.Merijn Brand, Hongwen Qiu, Hugo van der Sanden, Ian Goodacre, James E Keenan, James Mastros,Jan Dubois, Jay Hannah, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Jirka Hruška, John Peacock,Joshua ben Jore, Joshua Pritikin, Karl Williamson, Kevin Ryde, kmx, Lars Dɪᴇᴄᴋᴏᴡ , LarwanBerke, Leon Brocard, Leon Timmermans, Lubomir Rintel, Lukas Mai, Maik Hentsche, Marty Pauley,Marvin Humphrey, Matt Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael Fig, Michael GSchwern, Michael Parker, Michael Stevens, Michael Witten, Mike Kelly, Moritz Lenz, Nicholas Clark,Nick Cleaton, Nick Johnston, Nicolas Kaiser, Niko Tyni, Noirin Shirley, Nuno Carvalho, Paul Evans,Paul Green, Paul Johnson, Paul Marquess, Peter J. Holzer, Peter John Acklam, Peter Martini, PhilippeBruhat (BooK), Piotr Fusik, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Renee Baecker, RicardoSignes, Richard Möhn, Richard Soderberg, Rob Hoelz, Robin Barker, Ruslan Zakirov, Salvador Fandiño,Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay,Steven Schubiger, Steve Peters, Sullivan Beck, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo, TomChristiansen, Tom Hukins, Tony Cook, Tye McQueen, Vadim Konovalov, Vernon Lyon, Vincent Pit, WaltMankowski, Wolfram Humann, Yves Orton, Zefram и Zsbán Ambrus.
    • use v5.14 or die;
    • Or at least
    • use v5.14 or v5.12 ;-)
    • __END__Andrew Shitov andy@shitov.ru