SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Perl 5.16 new features




Perl Mova              Kiev, Ukraine


       Pavel Vlasov, 2012
Content

1.Perl 5.16 coming
2.Unicode features
3.Other features
4.New documentation
5.Performance
1. Perl 5.16 coming

• Development of Perl 5 (1994 – now)
  - 18 years

• Release date of Perl 5.16
  - 16 may 2012 (in next few days)
1. Perl 5.16 coming

• Perl 5.14 – 14 may 2011
• Perl 5.16 – 16 may 2012
…....
• Perl 5.30 – 30 may 2026
• Perl 5.32 - ?????
2. Unicode features


 •   fc (fold case)
 •   quotameta
 •   unicode_eval
 •   evalbytes
2. Fold case
• Compare strings non-unicode
uc($string1) eq = uc($string2)

$string1 = ‘A’; $string2 = ‘a’;
uc(‘A’) = A     uc(‘a) =A
Result: OK


$string1 = ‘ß’;
uc(‘ß’) = ‘SS’

It’s NOT OK
2. Fold case

• Compare strings in unicode

  use feature ‘fc’;
  fc($unicode1) eq fc($unicode2)

• Use casefolding
• inside a double-quoting string - "F$variable"
2. quotameta

• In Perl 5.16 adopted a Unicode-defined strategy for quoting
  non-ASCII characters

  my $string = ‘Perl May 2011 in Moscow';
  my $substr = ‘May.*?Moscow';
  $string =~ s{Q$substrE}{Mova 2012 in Kiev};

• Or:

  use feature ‘unicode_strings’;
  my $string = ‘Perl May 2011 in Moscow';
  my $substr = ‘May.*?Moscow';
  my $quoted_substr = quotemeta($substr);
  $string =~ s{$quoted_substr}{Mova 2012 in Kiev};
2. unicode_eval, evalbytes

unicode_eval default feature of Perl 5.16
   eval – evaluate string of characters

evalbytes – die if the string contains any
  characters outside the 8-bit range
3. Other features

•   current sub __SUB__
•   CORE namespace
•   array base
•   debugger
3. Current sub

• current_sub (__SUB__) - reference to the current
  subroutine or undef outside of subroutine
• easier to write recursive closures.

use feature ‘current_sub’;
sub closure {
  my $init = shift;

    return sub {
        state $counter = $init;
        return if $counter++ > 10;
        __SUB__->();
    }
}
3. CORE Namespace

• Namespace for Perl’s core routines
• Give access to the original built-in of Perl

use v5.16;
   or
use feature ‘say’;
   or
CORE::say “yes”;
3. array base

• special variable for array base
• The 'array_base' feature replace variable $[
• $[ affected also string not only arrays

use feature ‘array_base’;
$[ = 1;
3. debugger


• Tracing mode (t command) accept number of
  subroutine for trace

• Breakpoints with file names
$ b [file]:[line] [condition]
$ b lib/MyModule.pm:237 $x > 30
4. New documentation

•   perldtrace
•   perlexperiment
•   perlootut
•   perlxstypemap
5. Performance

 Improved performance for Unicode
 properties in regexp
 local $_ is faster now



 More? perl5160delta.pod
Used resources


• Perl5160delta.pod
• www.effectiveperlprogramming.com
• Mailing list of p5p
Thank you for attention!

paul.vlasov@gmail.com

Contenu connexe

Tendances

Perl one-liners
Perl one-linersPerl one-liners
Perl one-linersdaoswald
 
Runtime Symbol Resolution
Runtime Symbol ResolutionRuntime Symbol Resolution
Runtime Symbol ResolutionKen Kawamoto
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambdaIvar Østhus
 
Elements of C++11
Elements of C++11Elements of C++11
Elements of C++11Uilian Ries
 
How Functions Work
How Functions WorkHow Functions Work
How Functions WorkSaumil Shah
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and UtilitiesPramod Kumar
 
c++ Lecture 3
c++ Lecture 3c++ Lecture 3
c++ Lecture 3sajidpk92
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/ProxyPeter Eisentraut
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10acme
 
02 - Second meetup
02 - Second meetup02 - Second meetup
02 - Second meetupEdiPHP
 
The Ring programming language version 1.3 book - Part 60 of 88
The Ring programming language version 1.3 book - Part 60 of 88The Ring programming language version 1.3 book - Part 60 of 88
The Ring programming language version 1.3 book - Part 60 of 88Mahmoud Samir Fayed
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life CycleXinchen Hui
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)julien pauli
 
Java Basics
Java BasicsJava Basics
Java BasicsSunil OS
 
The Ring programming language version 1.9 book - Part 101 of 210
The Ring programming language version 1.9 book - Part 101 of 210The Ring programming language version 1.9 book - Part 101 of 210
The Ring programming language version 1.9 book - Part 101 of 210Mahmoud Samir Fayed
 
Unit 4
Unit 4Unit 4
Unit 4siddr
 

Tendances (20)

Perl one liners
Perl one linersPerl one liners
Perl one liners
 
Perl one-liners
Perl one-linersPerl one-liners
Perl one-liners
 
Runtime Symbol Resolution
Runtime Symbol ResolutionRuntime Symbol Resolution
Runtime Symbol Resolution
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambda
 
Elements of C++11
Elements of C++11Elements of C++11
Elements of C++11
 
How Functions Work
How Functions WorkHow Functions Work
How Functions Work
 
Use of Apache Commons and Utilities
Use of Apache Commons and UtilitiesUse of Apache Commons and Utilities
Use of Apache Commons and Utilities
 
c++ Lecture 3
c++ Lecture 3c++ Lecture 3
c++ Lecture 3
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Introduction to Perl Programming
Introduction to Perl ProgrammingIntroduction to Perl Programming
Introduction to Perl Programming
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
Php engine
Php enginePhp engine
Php engine
 
02 - Second meetup
02 - Second meetup02 - Second meetup
02 - Second meetup
 
The Ring programming language version 1.3 book - Part 60 of 88
The Ring programming language version 1.3 book - Part 60 of 88The Ring programming language version 1.3 book - Part 60 of 88
The Ring programming language version 1.3 book - Part 60 of 88
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life Cycle
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Clojure 7-Languages
Clojure 7-LanguagesClojure 7-Languages
Clojure 7-Languages
 
The Ring programming language version 1.9 book - Part 101 of 210
The Ring programming language version 1.9 book - Part 101 of 210The Ring programming language version 1.9 book - Part 101 of 210
The Ring programming language version 1.9 book - Part 101 of 210
 
Unit 4
Unit 4Unit 4
Unit 4
 

En vedette

Un sencillo gesto con importantes consecuencias medio ambientales
Un sencillo gesto con importantes consecuencias medio ambientalesUn sencillo gesto con importantes consecuencias medio ambientales
Un sencillo gesto con importantes consecuencias medio ambientalesecarbono18
 
プリントアウトのコストダウンのコツ《総務・経理の方へ》
プリントアウトのコストダウンのコツ《総務・経理の方へ》プリントアウトのコストダウンのコツ《総務・経理の方へ》
プリントアウトのコストダウンのコツ《総務・経理の方へ》吉田印刷所
 
Sqa sg sheet
Sqa sg sheetSqa sg sheet
Sqa sg sheetnmcquade
 
The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!Randy Carey
 
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」吉田印刷所
 
Nofta postharvest financing project
Nofta postharvest financing projectNofta postharvest financing project
Nofta postharvest financing projectAsian People's Fund
 
Mans nākotnes novads2
Mans nākotnes  novads2Mans nākotnes  novads2
Mans nākotnes novads2egilsdo
 
Khmer culture, civilization (part4)
Khmer culture, civilization (part4)Khmer culture, civilization (part4)
Khmer culture, civilization (part4)Mut Somoeun
 
Ce este agenţia de ştiri
Ce este agenţia de ştiriCe este agenţia de ştiri
Ce este agenţia de ştiriLucia Andronic
 
Tesol summer institute 2014 giving student feedback
Tesol summer institute 2014  giving student feedbackTesol summer institute 2014  giving student feedback
Tesol summer institute 2014 giving student feedbackTelly J Hajny
 
3INVESTONLINE.COM
3INVESTONLINE.COM3INVESTONLINE.COM
3INVESTONLINE.COMthreeinvest
 
Pašv sad saldus_101111
Pašv sad saldus_101111Pašv sad saldus_101111
Pašv sad saldus_101111egilsdo
 

En vedette (20)

Un sencillo gesto con importantes consecuencias medio ambientales
Un sencillo gesto con importantes consecuencias medio ambientalesUn sencillo gesto con importantes consecuencias medio ambientales
Un sencillo gesto con importantes consecuencias medio ambientales
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
プリントアウトのコストダウンのコツ《総務・経理の方へ》
プリントアウトのコストダウンのコツ《総務・経理の方へ》プリントアウトのコストダウンのコツ《総務・経理の方へ》
プリントアウトのコストダウンのコツ《総務・経理の方へ》
 
Sqa sg sheet
Sqa sg sheetSqa sg sheet
Sqa sg sheet
 
Questions 4-7
Questions 4-7Questions 4-7
Questions 4-7
 
The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!
 
Presentacion Informatica
Presentacion InformaticaPresentacion Informatica
Presentacion Informatica
 
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」
環境・エコロジー担当の方へ「ムダな印刷物をなくす吉田印刷所の提案」
 
Nofta postharvest financing project
Nofta postharvest financing projectNofta postharvest financing project
Nofta postharvest financing project
 
Mans nākotnes novads2
Mans nākotnes  novads2Mans nākotnes  novads2
Mans nākotnes novads2
 
Bullying
BullyingBullying
Bullying
 
Eidn 3-sinamob
Eidn 3-sinamobEidn 3-sinamob
Eidn 3-sinamob
 
Khmer culture, civilization (part4)
Khmer culture, civilization (part4)Khmer culture, civilization (part4)
Khmer culture, civilization (part4)
 
We didn't watch tv
We didn't watch tvWe didn't watch tv
We didn't watch tv
 
Bahan kuliah 1
Bahan kuliah 1 Bahan kuliah 1
Bahan kuliah 1
 
Ce este agenţia de ştiri
Ce este agenţia de ştiriCe este agenţia de ştiri
Ce este agenţia de ştiri
 
Tesol summer institute 2014 giving student feedback
Tesol summer institute 2014  giving student feedbackTesol summer institute 2014  giving student feedback
Tesol summer institute 2014 giving student feedback
 
191 195
191 195191 195
191 195
 
3INVESTONLINE.COM
3INVESTONLINE.COM3INVESTONLINE.COM
3INVESTONLINE.COM
 
Pašv sad saldus_101111
Pašv sad saldus_101111Pašv sad saldus_101111
Pašv sad saldus_101111
 

Similaire à Perl 5.16 new features

Php basics
Php basicsPhp basics
Php basicshamfu
 
Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?Mario Camou Riveroll
 
Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Michelangelo van Dam
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CSwift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CAlexis Gallagher
 
Whatsnew in-perl
Whatsnew in-perlWhatsnew in-perl
Whatsnew in-perldaoswald
 
Modern Perl Catch-Up
Modern Perl Catch-UpModern Perl Catch-Up
Modern Perl Catch-UpDave Cross
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Puppet
 
Damien seguy php 5.6
Damien seguy php 5.6Damien seguy php 5.6
Damien seguy php 5.6Damien Seguy
 
The Ring programming language version 1.8 book - Part 96 of 202
The Ring programming language version 1.8 book - Part 96 of 202The Ring programming language version 1.8 book - Part 96 of 202
The Ring programming language version 1.8 book - Part 96 of 202Mahmoud Samir Fayed
 
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
Practical approach to perl day1
Practical approach to perl day1Practical approach to perl day1
Practical approach to perl day1Rakesh Mukundan
 
Elixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to ErlangElixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to ErlangLaura M. Castro
 

Similaire à Perl 5.16 new features (20)

Syntax
SyntaxSyntax
Syntax
 
Php basics
Php basicsPhp basics
Php basics
 
Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?
 
Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010Php Crash Course - Macq Electronique 2010
Php Crash Course - Macq Electronique 2010
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CSwift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-C
 
Whatsnew in-perl
Whatsnew in-perlWhatsnew in-perl
Whatsnew in-perl
 
Modern Perl Catch-Up
Modern Perl Catch-UpModern Perl Catch-Up
Modern Perl Catch-Up
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
 
Introduction in php
Introduction in phpIntroduction in php
Introduction in php
 
Damien seguy php 5.6
Damien seguy php 5.6Damien seguy php 5.6
Damien seguy php 5.6
 
Slide
SlideSlide
Slide
 
The Ring programming language version 1.8 book - Part 96 of 202
The Ring programming language version 1.8 book - Part 96 of 202The Ring programming language version 1.8 book - Part 96 of 202
The Ring programming language version 1.8 book - Part 96 of 202
 
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
 
Introducing perl6
Introducing perl6Introducing perl6
Introducing perl6
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
 
Beyond java8
Beyond java8Beyond java8
Beyond java8
 
Introduction in php part 2
Introduction in php part 2Introduction in php part 2
Introduction in php part 2
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Practical approach to perl day1
Practical approach to perl day1Practical approach to perl day1
Practical approach to perl day1
 
Elixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to ErlangElixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to Erlang
 

Dernier

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Dernier (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Perl 5.16 new features

  • 1. Perl 5.16 new features Perl Mova Kiev, Ukraine Pavel Vlasov, 2012
  • 2. Content 1.Perl 5.16 coming 2.Unicode features 3.Other features 4.New documentation 5.Performance
  • 3. 1. Perl 5.16 coming • Development of Perl 5 (1994 – now) - 18 years • Release date of Perl 5.16 - 16 may 2012 (in next few days)
  • 4. 1. Perl 5.16 coming • Perl 5.14 – 14 may 2011 • Perl 5.16 – 16 may 2012 ….... • Perl 5.30 – 30 may 2026 • Perl 5.32 - ?????
  • 5. 2. Unicode features • fc (fold case) • quotameta • unicode_eval • evalbytes
  • 6. 2. Fold case • Compare strings non-unicode uc($string1) eq = uc($string2) $string1 = ‘A’; $string2 = ‘a’; uc(‘A’) = A uc(‘a) =A Result: OK $string1 = ‘ß’; uc(‘ß’) = ‘SS’ It’s NOT OK
  • 7. 2. Fold case • Compare strings in unicode use feature ‘fc’; fc($unicode1) eq fc($unicode2) • Use casefolding • inside a double-quoting string - "F$variable"
  • 8. 2. quotameta • In Perl 5.16 adopted a Unicode-defined strategy for quoting non-ASCII characters my $string = ‘Perl May 2011 in Moscow'; my $substr = ‘May.*?Moscow'; $string =~ s{Q$substrE}{Mova 2012 in Kiev}; • Or: use feature ‘unicode_strings’; my $string = ‘Perl May 2011 in Moscow'; my $substr = ‘May.*?Moscow'; my $quoted_substr = quotemeta($substr); $string =~ s{$quoted_substr}{Mova 2012 in Kiev};
  • 9. 2. unicode_eval, evalbytes unicode_eval default feature of Perl 5.16 eval – evaluate string of characters evalbytes – die if the string contains any characters outside the 8-bit range
  • 10. 3. Other features • current sub __SUB__ • CORE namespace • array base • debugger
  • 11. 3. Current sub • current_sub (__SUB__) - reference to the current subroutine or undef outside of subroutine • easier to write recursive closures. use feature ‘current_sub’; sub closure { my $init = shift; return sub { state $counter = $init; return if $counter++ > 10; __SUB__->(); } }
  • 12. 3. CORE Namespace • Namespace for Perl’s core routines • Give access to the original built-in of Perl use v5.16; or use feature ‘say’; or CORE::say “yes”;
  • 13. 3. array base • special variable for array base • The 'array_base' feature replace variable $[ • $[ affected also string not only arrays use feature ‘array_base’; $[ = 1;
  • 14. 3. debugger • Tracing mode (t command) accept number of subroutine for trace • Breakpoints with file names $ b [file]:[line] [condition] $ b lib/MyModule.pm:237 $x > 30
  • 15. 4. New documentation • perldtrace • perlexperiment • perlootut • perlxstypemap
  • 16. 5. Performance Improved performance for Unicode properties in regexp local $_ is faster now More? perl5160delta.pod
  • 17. Used resources • Perl5160delta.pod • www.effectiveperlprogramming.com • Mailing list of p5p
  • 18. Thank you for attention! paul.vlasov@gmail.com