SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Perl 5, Version 13
David Golden
dagolden@cpan.org
www.dagolden.com
OSCON ▪ July 22, 2010
Perl 5, Version 13 development
 5.13.0 – Apr 20, 2010 – Leon Brocard
 5.13.1 – May 20, 2010 – Ricardo Signes
 5.13.2 – Jun 22, 2010 – Matt S. Trout
 5.13.3 – Jul 20, 2010 – David Golden
 5.13.4 – Aug ??, 2010 – Florian Ragwitz
Hardest part of releasing Perl 5?
 Writing the perldelta.
 Seriously. Ask anyone who has written one.
 Pumpkings have resigned rather than
writing the perldelta!*
* I'm kidding.
How did Jesse get to be Pumpking?
a) Throwing coffee mugs at a #p5p BOF
b) Given Excalibur by the Lady of the Lake
c) Volunteered to write 5.11 perldelta
d) Woke up with a hangover and an onion tattoo
How did Jesse get to be Pumpking?
a) Throwing coffee mugs
b) Given Excalibur by the Lady of the Lake
c) Volunteered to write 5.11 perldelta*
d) Woke up with a hangover and an onion tattoo
* Not really true
This talk is a perldeltadelta
 A summary of the summaries
 Stuff you might actually use
 Internal stuff you shouldn't ignore
Perl 5, Version 13, Subversion 0
 Faster shift without arguments
o my $self = shift; my $env = shift;
o 5% faster over shift(@_) on non-threaded perl
o 25% faster on threaded
 On linux, assigning to $0 sets process name
for ps, top, etc.
o $0 = "my-app-foo";
Perl 5, Version 13, Subversion 1
 given returns a value
# old way in 5.12
my $type;
given ($string) {
$type = undef when undef;
$type = 'digits' when /^d+$/;
$type = 'word' when /^w+$/;
$type = 'unknown';
};
Perl 5, Version 13, Subversion 1
 given returns a value (but must use do)
# new way in 5.13.1
my $type = do {
given ($string) {
break when undef;
'digits' when /^d+$/;
'word' when /^w+$/;
'unknown';
}
};
Perl 5, Version 13, Subversion 1
 Exceptions are less insane
o When an exception is thrown in an eval block,
$@ will not be clobbered exiting the eval
o Exceptions in DESTROY always warn, instead of
only sometimes warning
o Also, warn() takes objects just like die()
 Removed from core (available on CPAN)
o Class::ISA, Pod::Plainer, Switch
Perl 5, Version 13, Subversion 2
 Non-destructive substitution
(think 'r' for 'return')
@d = map { s/::/-/g; $_ } @m # 5.12
@d = map { s/::/-/gr } @m # 5.13.2
($new = $old) =~ s/cat/dog/; # 5.12
$new = $old =~ s/cat/dog/r; # 5.13.2
Perl 5, Version 13, Subversion 2
 package block syntax
{ package Foo; ... } # 5.12
package Foo { ... } # 5.13.2
{ package Foo 1.23; ... } # 5.12
package Foo 1.23 { ... } # 5.13.2
Perl 5, Version 13, Subversion 3
 New octal escape
o o{} similar to x{} and N{}
"033" # ESC (the old way)
"o{33}" # ESC (new for 5.13.3)
"o{23072}" # SMILEY (new for 5.13.3)
 Old octal escapes were insane
o "777" ne "0777"
o "023072" eq "023" . "072"
o qq{$stuff 10} # octal
o qr{$stuff 10} # octal OR backref
Perl 5, Version 13, Subversion 3
 N{NAME} understands abbreviations
"N{NBSP}" # N{NO-BREAK SPACE}
 Better documentation of all characters
escapes
 Dual-life modules synchronized with CPAN
Perl 5, Version 13 future
 "Contentious changes freeze" - 20 Dec 2010
 "User-visible changes freeze" - 20 Feb 2011
 "Hard freeze" - 30 Mar 2011
 "5.14 target release date" - 20 Apr 2011

Mais conteúdo relacionado

Mais de David Golden

Slice Recycling Performance and Pitfalls
Slice Recycling Performance and PitfallsSlice Recycling Performance and Pitfalls
Slice Recycling Performance and PitfallsDavid Golden
 
Eversion 101: An Introduction to Inside-Out Objects
Eversion 101: An Introduction to Inside-Out ObjectsEversion 101: An Introduction to Inside-Out Objects
Eversion 101: An Introduction to Inside-Out ObjectsDavid Golden
 
One BSON to Rule Them
One BSON to Rule ThemOne BSON to Rule Them
One BSON to Rule ThemDavid Golden
 
Adventures in Optimization
Adventures in OptimizationAdventures in Optimization
Adventures in OptimizationDavid Golden
 
Make Comments Stand Out
Make Comments Stand OutMake Comments Stand Out
Make Comments Stand OutDavid Golden
 
State of the Velociraptor Mini-Keynote: Perl Toolchain
State of the Velociraptor Mini-Keynote: Perl ToolchainState of the Velociraptor Mini-Keynote: Perl Toolchain
State of the Velociraptor Mini-Keynote: Perl ToolchainDavid Golden
 
Practical Consistency
Practical ConsistencyPractical Consistency
Practical ConsistencyDavid Golden
 
How I get to the ☞
How I get to the ☞How I get to the ☞
How I get to the ☞David Golden
 
Real World Optimization
Real World OptimizationReal World Optimization
Real World OptimizationDavid Golden
 
Safer Chainsaw Juggling (Lightning Talk)
Safer Chainsaw Juggling (Lightning Talk)Safer Chainsaw Juggling (Lightning Talk)
Safer Chainsaw Juggling (Lightning Talk)David Golden
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
 
Juggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBDavid Golden
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugDavid Golden
 
Cooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialCooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialDavid Golden
 
Cooking Perl with Chef
Cooking Perl with ChefCooking Perl with Chef
Cooking Perl with ChefDavid Golden
 

Mais de David Golden (17)

Slice Recycling Performance and Pitfalls
Slice Recycling Performance and PitfallsSlice Recycling Performance and Pitfalls
Slice Recycling Performance and Pitfalls
 
Free QA!
Free QA!Free QA!
Free QA!
 
Eversion 101: An Introduction to Inside-Out Objects
Eversion 101: An Introduction to Inside-Out ObjectsEversion 101: An Introduction to Inside-Out Objects
Eversion 101: An Introduction to Inside-Out Objects
 
IsTrue(true)?
IsTrue(true)?IsTrue(true)?
IsTrue(true)?
 
One BSON to Rule Them
One BSON to Rule ThemOne BSON to Rule Them
One BSON to Rule Them
 
Adventures in Optimization
Adventures in OptimizationAdventures in Optimization
Adventures in Optimization
 
Make Comments Stand Out
Make Comments Stand OutMake Comments Stand Out
Make Comments Stand Out
 
State of the Velociraptor Mini-Keynote: Perl Toolchain
State of the Velociraptor Mini-Keynote: Perl ToolchainState of the Velociraptor Mini-Keynote: Perl Toolchain
State of the Velociraptor Mini-Keynote: Perl Toolchain
 
Practical Consistency
Practical ConsistencyPractical Consistency
Practical Consistency
 
How I get to the ☞
How I get to the ☞How I get to the ☞
How I get to the ☞
 
Real World Optimization
Real World OptimizationReal World Optimization
Real World Optimization
 
Safer Chainsaw Juggling (Lightning Talk)
Safer Chainsaw Juggling (Lightning Talk)Safer Chainsaw Juggling (Lightning Talk)
Safer Chainsaw Juggling (Lightning Talk)
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order Functions
 
Juggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDB
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with Jitterbug
 
Cooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World TutorialCooking Perl with Chef: Hello World Tutorial
Cooking Perl with Chef: Hello World Tutorial
 
Cooking Perl with Chef
Cooking Perl with ChefCooking Perl with Chef
Cooking Perl with Chef
 

Último

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Último (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Perl 5 Version 13 Development and New Features

  • 1. Perl 5, Version 13 David Golden dagolden@cpan.org www.dagolden.com OSCON ▪ July 22, 2010
  • 2. Perl 5, Version 13 development  5.13.0 – Apr 20, 2010 – Leon Brocard  5.13.1 – May 20, 2010 – Ricardo Signes  5.13.2 – Jun 22, 2010 – Matt S. Trout  5.13.3 – Jul 20, 2010 – David Golden  5.13.4 – Aug ??, 2010 – Florian Ragwitz
  • 3. Hardest part of releasing Perl 5?  Writing the perldelta.  Seriously. Ask anyone who has written one.  Pumpkings have resigned rather than writing the perldelta!* * I'm kidding.
  • 4. How did Jesse get to be Pumpking? a) Throwing coffee mugs at a #p5p BOF b) Given Excalibur by the Lady of the Lake c) Volunteered to write 5.11 perldelta d) Woke up with a hangover and an onion tattoo
  • 5. How did Jesse get to be Pumpking? a) Throwing coffee mugs b) Given Excalibur by the Lady of the Lake c) Volunteered to write 5.11 perldelta* d) Woke up with a hangover and an onion tattoo * Not really true
  • 6. This talk is a perldeltadelta  A summary of the summaries  Stuff you might actually use  Internal stuff you shouldn't ignore
  • 7. Perl 5, Version 13, Subversion 0  Faster shift without arguments o my $self = shift; my $env = shift; o 5% faster over shift(@_) on non-threaded perl o 25% faster on threaded  On linux, assigning to $0 sets process name for ps, top, etc. o $0 = "my-app-foo";
  • 8. Perl 5, Version 13, Subversion 1  given returns a value # old way in 5.12 my $type; given ($string) { $type = undef when undef; $type = 'digits' when /^d+$/; $type = 'word' when /^w+$/; $type = 'unknown'; };
  • 9. Perl 5, Version 13, Subversion 1  given returns a value (but must use do) # new way in 5.13.1 my $type = do { given ($string) { break when undef; 'digits' when /^d+$/; 'word' when /^w+$/; 'unknown'; } };
  • 10. Perl 5, Version 13, Subversion 1  Exceptions are less insane o When an exception is thrown in an eval block, $@ will not be clobbered exiting the eval o Exceptions in DESTROY always warn, instead of only sometimes warning o Also, warn() takes objects just like die()  Removed from core (available on CPAN) o Class::ISA, Pod::Plainer, Switch
  • 11. Perl 5, Version 13, Subversion 2  Non-destructive substitution (think 'r' for 'return') @d = map { s/::/-/g; $_ } @m # 5.12 @d = map { s/::/-/gr } @m # 5.13.2 ($new = $old) =~ s/cat/dog/; # 5.12 $new = $old =~ s/cat/dog/r; # 5.13.2
  • 12. Perl 5, Version 13, Subversion 2  package block syntax { package Foo; ... } # 5.12 package Foo { ... } # 5.13.2 { package Foo 1.23; ... } # 5.12 package Foo 1.23 { ... } # 5.13.2
  • 13. Perl 5, Version 13, Subversion 3  New octal escape o o{} similar to x{} and N{} "033" # ESC (the old way) "o{33}" # ESC (new for 5.13.3) "o{23072}" # SMILEY (new for 5.13.3)  Old octal escapes were insane o "777" ne "0777" o "023072" eq "023" . "072" o qq{$stuff 10} # octal o qr{$stuff 10} # octal OR backref
  • 14. Perl 5, Version 13, Subversion 3  N{NAME} understands abbreviations "N{NBSP}" # N{NO-BREAK SPACE}  Better documentation of all characters escapes  Dual-life modules synchronized with CPAN
  • 15. Perl 5, Version 13 future  "Contentious changes freeze" - 20 Dec 2010  "User-visible changes freeze" - 20 Feb 2011  "Hard freeze" - 30 Mar 2011  "5.14 target release date" - 20 Apr 2011