Your SlideShare is downloading. ×
Perl 5.10
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Perl 5.10

2,469

Published on

My talk on Perl 5.10 at the London Perl Workshop 2009.

My talk on Perl 5.10 at the London Perl Workshop 2009.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,469
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
25
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Perl . Léon Brocard London Perl Workshop
  • 2. Me Léon Brocard French, live in London Like food Like the colour orange Founded Amsterdam.pm, Bath.pm, Croydon.pm Now leader of London.pm Started YAPC::Europe perl hacker
  • 3. Releases - - Perl - - Perl - - Perl - - Perl - - Perl ... Perl is years old Perl is years old
  • 4. Perl releases - - Perl - - Perl . - - Perl . - - Perl . - - Perl . - - Perl . - - Perl . . - - Perl . . - - Perl . . - - Perl . .
  • 5. Perl . New features
  • 6. Perl . New feature use feature ’say’; use feature ’state’; use feature ’switch’; ... use feature ’:5.10’;
  • 7. Say operator Just like print, but implicitly appends a newline use feature ’say’; say ’Hello!’;
  • 8. State operator Persistent private variables use feature ’state’; sub gimme_another { state $x; return ++$x }
  • 9. Smart match operator $a ~~ /foo/ @a ~~ /foo/ $a ~~ @b $a ~~ %b ...
  • 10. Switch and smart match operator use feature ’switch’; given ($foo) { when (/^abc/) { $abc = 1; } when (/^def/) { $def = 1; } when (/^xyz/) { $xyz = 1; } default { $nothing = 1; } }
  • 11. Switch and smart match operator use feature ":5.10"; given($foo) { when (undef) { say ’$foo is undefined’; } when ("foo") { say ’$foo is the string "foo"’; } when ([1,3,5,7,9]) { say ’$foo is an odd digit’; continue; # Fall through } when ($_ < 100) { say ’< 100’; } when (&complicated_check) { say ’a complicated check for $foo is true’; } default { die ’Eeeeek’; } }
  • 12. De ned-or operator $a // $b defined $a ? $a : $b $c //= $d; $c = $d unless defined $c;
  • 13. Regular expressions Recursive patterns Named capture bu ers Possessive quanti ers Backtracking control verbs Relative backreferences Vertical and horizontal whitespace, and linebreak
  • 14. Named capture bu ers use feature ’say’; my $time = ’Time: 01:02:03’; if ($time =~ /Time:s(d+):(d+):(d+)/) { say "$1 / $2 / $3"; } if ($time =~ /Time:s(?<hours>d+): (?<minutes>d+):(?<seconds>d+)/x) { say "$+{hours} / $+{minutes} / $+{seconds}"; }
  • 15. New modules Archive::Extract, Archive::Tar, Compress::Zlib, CPANPLUS, Digest::SHA, encoding::warnings, ExtUtils::CBuilder, ExtUtils::ParseXS, File::Fetch, Hash::Util::FieldHash, IO::Zlib, IPC::Cmd, Locale::Maketext::Simple, Log::Message, Log::Message::Simple, Math::BigInt::FastCalc, Module::Build, Module::CoreList, Module::Load, Module::Load::Conditional, Module::Loaded, Module::Pluggable, Object::Accessor, Package::Constants, Params::Check, Pod::Escapes, Pod::Simple, Term::UI, Time::Piece, Win32API::File.
  • 16. New documentation perlpragma — How to write a user pragma perlglossary — Perl Glossary perlreguts — Regular expression engine internals perlreapi — Regular expression plugin interface perlunitut — Perl Unicode Tutorial perlunifaq — Perl Unicode FAQ perlcommunity — Overview of the Perl community CORE — Pseudo-namespace for Perl’s core routines
  • 17. Performance enhancements In-place sorting Lexical array access XS-assisted SWASHGET Constant subroutines PERL_DONT_CREATE_GVSV Weak references are cheaper sort() enhancements Memory optimisations UTF- cache optimisation Sloppy stat on Windows Regular expressions optimisations
  • 18. Deprecations Pseudo-hashes have been removed Removal of the bytecode compiler and of perlcc Removal of the JPL
  • 19. Other Lexical $_, _ prototype, UNITCHECK blocks, mro pragma, readpipe() is now overridable, default argument for readline(), UNIVERSAL::DOES(), formats, byte-order modi ers for pack() and unpack(), no VERSION, chdir, chmod, chown on lehandles, OS groups, recursive sort subs, exceptions in constant folding, source lters in @INC, new internal variables, UCD . . , Miscellaneous Attribute Decoration, con guration improvements, compilation improvements, relocatable installations, nicer internals bison-based parser . . .
  • 20. Perl . . Many bug xes: @_ Optimised internals: isa()
  • 21. New features, modules DTrace support autodie Compress::Raw::Bzip parent Parse::CPAN::Meta
  • 22. Platform updates AIX Cygwin FreeBSD Irix Haiku MirOS BSD NetBSD Stratus VOS Symbian Win VMS
  • 23. Feature tweaks given/when switch smart match
  • 24. Deprecations Switch suidperl
  • 25. Internal changes Moved from Perforce to Git Changed directory structure
  • 26. Better quotes e J.R.R. Tolkien quotes at the head of each C source le have been checked and proper citations added
  • 27. More tests Perl . , core tests (+ , more for bundled libraries) Perl . . , core tests (+ , more for bundled libraries) Perl . . , core tests (+ , more for bundled libraries)
  • 28. Recent past and future Perl . . : Léon Brocard on Nov , Perl . . : Jesse Vincent on Dec , Perl . . : Ricardo Signes on Jan , Perl . . : Steve Hay on Feb , Perl . . : Ask Bjørn Hansen on Mar , ... Perl . : Jesse Vincent early
  • 29. Use Perl . now! Perl . is faster Perl . uses less memory Perl . has more features Perl . is backwards compatible

×