SlideShare a Scribd company logo
1 of 24
Download to read offline
The Evolution of Perl:

Highlights of Perl 5.14 and what's
       new in the Perl world
Agenda


•   Perl, ActivePerl, and ActiveState
•   Version support – from the community and ActiveState
•   What's new in Perl 5.14
•   Re-factoring or maintaining existing code
•   Web frameworks and Plack/PSGI
•   Running Perl applications in the cloud
Perl
•   Created by Larry Wall in 1987
•   Perl 5 released in 1995
    – language syntax stabilizes
    – first “extensible” version (use Some::Module)

•   Continued improvements through the 5.x series

•   Perl 6 – beyond the scope of this presentation
    – essentially a new language
    – a language specification, not an official compiler
    – Rakudo and other compilers available for early adopters
ActivePerl

•   ActiveState contracted by Microsoft to improve Perl
    performance and features for Windows
•   ActivePerl enhancements submitted back to core Perl
•   ActivePerl helps popularize Perl
       –   2 million downloads per year
•   adds some useful things
       –   PPM (Perl Package Manager)
       –   PerlCritic (from Perl Dev Kit)
       –   PerlScript and Perl for ISAPI extensions
& PPM
•   CPAN is a 'one stop shop' for user-created modules
    – standard toolchain for building, testing, and installing modules
    – searchable
    – standardized documentation format
    – bug tracking
    – HUGE: 23,000 modules (distributions)

•   PPM is ActivePerl's client for installing these modules
    – command line and GUI interface
    – pre-compiled packages for specific platforms and Perl versions
    – dependencies handled automatically
    – provides most modules on CPAN (around 13,000 packages per
      platform)
Perl Releases
•   Perl releases used to be feature-based until 5.10
       –   released “when it's done”

•   time-based releases since Perl 5.12 (April 2010)
       –   no feature milestones to define the release
       –   only features ready by release-time will be included
       –   predictable upgrade schedule
Perl Support Policy
•   Perl community supports the most recent two releases
       –   new features
       –   security patches
       –   bug fixes
•   ActiveState mirrors this policy for Community Edition
•   Older versions available through Business Edition,
    Enterprise Edition and OEM
       –   extended support
       –   professional services
What's new in Perl 5.14

•
    Unicode improvements
•
    Reliable exception handling
•
    Non-destructive substitution
•
    more...
Unicode
•   Unicode 6.0 almost fully supported

•   N{NAME} and charnames enhancements

•   use feature 'unicode_strings'
Regular Expressions
•   New character set modifiers:
    –   /a   ASCII
    –   /d   Default (or dodgy)
    –   /l   Locale
    –   /u   Unicode

•   Caution: Modified stringification!
    for example: qr/foo/i
    –   Old: (?i-xsm:foo)
    –   New: (?^i:foo)
Non-destructive substitution
(my $copy = $orig) =~ s/cat/dog/;
my $copy = $orig =~ s/cat/dog/r;



my @copy = map {
   (my $copy = $_) =~ s/cat/dog/; $copy
} @orig;

my @copy = map { s/cat/dog/r } @orig;
Exception Handling
•   Problems:
    –   eval() in DESTROY methods
    –   die() in DESTROY methods
    –   local $@

•   Solution:
    –   Set $@ as late as possible before exiting the eval scope

•   Exceptions are now a lot more reliable
Don’t use smart-match
•   Smart match operator ~~ introduced in 5.10.0
•   “Fixed” in 5.10.1 because is wasn’t working

•   Still considered “too smart for it’s own good”
    •   Over 20 rules on how it works
    •   Rules apply recursively for container types

•   May be replaced by “dump match” in the future

•   All this applies to the given/when statements too.
Maintaining or updating Perl code
 Try running it with with a newer interpreter – it may just work.
 The interpreter will warn about deprecated code

 – incremental approach: 5.8 to 5.10 to 5.12 to 5.14
  • use warnings;
  • less likely to “break” existing code
  • setting up each environment takes time and effort



 – direct approach: upgrading directly to 5.14
  • address all the incompatibilities at once
  • opportunity to re-factor and use new language features
  • great excuse to write automated tests!
     – write tests for the old version first, then run them against 5.12
Consult perldelta
•   each Perl release has a list of differences and
    incompatibilities with the previous version
    – http://perldoc.perl.org/index-history.html
    – also in the ActivePerl documentation
•   pay particular attention to the Incompatible Changes
    section
•   don't skip a major version
    – the perldeltas are not cumulative - going from 5.10 to 5.14,
      check the 5.12 delta
    – you can skip odd numbered development releases (5.9, 5.11,
      etc.)
Check all modules
•   binary modules are NOT compatible between major
    Perl versions (e.g. 5.12 to 5.14)
•   update to the latest modules where possible
•   using PPM helps (ppm profile ...)
•   Check the module's Changes file and documentation
Use Perl::Critic
•   Perl::Critic – for examining your source code
    – uses Conway's “Perl Best Practices”
    – points out bad or deprecated code and suggests alternatives
•   ActivePerl has a helpful GUI interface
    – added in 5.12
    – formerly part of the Perl Dev Kit
... or don't upgrade
•   You may choose not to upgrade to 5.12 or 5.14 – there
    are commercial support options:


•   ActivePerl Business Edition provides access to older
    builds of ActivePerl
•   ActivePerl Enterprise Edition can provide access and
    support for specific versions and platform builds
•   OEM licensing lets you distribute ActivePerl with your
    product
Web Frameworks and Plack/PSGI

•
    Catalyst
•
    Mojolicious
•
    Dancer

... all work with Plack/PSGI
•
   interface between Perl web applications and web servers
•
   simplifies web application deployment
Catalyst

•
    most popular framework in a recent ActiveState survey
       –   relatively speaking, it's been around a long time (2005)
       –   wide enterprise adoption

•
    a “heavyweight” framework
       –   many dependencies
       –   very “TMTOWTDO” design, lots of choices for sub-
           components
       –   very flexible
Mojolicious

•
    new web framework from author of Catalyst, Sebastian
    Riedel
•
    Mojo originally intended as a rewrite of Catalyst
    internals
•
    lighter weight
       –   fewer dependencies
       –   “optimized for user-friendliness”
Dancer

•
    micro-framework
•
    for smaller sites, web services, or people who just
    prefer a very lightweight framework
•
    similar to Ruby's Sinatra or Python's Flask
Perl in the cloud
The Platform as a Service approach proved very popular in the Ruby on
 Rails community – has also caught on with other languages and
 frameworks




•   a framework for frameworks...
       –   not a PaaS... it's for creating your own PaaS
       –   supports multiple languages and frameworks
       –   Perl web apps via PSGI
       –   based on Cloud Foundry – more accessible for Perl and Python developers
       –   http://activestate.com/cloud
Thank You



                 Speak to a representative about
           ActivePerl Business Edition, Enterprise Edition
                     or OEM: 1-866-510-2914
               business-solutions@activestate.com
                       www.activestate.com




08/12/10

More Related Content

What's hot

Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
Paul Fiore
 

What's hot (20)

Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Moving 1,000 Users & 100 Branches into Streams
Moving 1,000 Users & 100 Branches into StreamsMoving 1,000 Users & 100 Branches into Streams
Moving 1,000 Users & 100 Branches into Streams
 
Ekon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop DelphiEkon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop Delphi
 
Yang in OpenDaylight
Yang in OpenDaylightYang in OpenDaylight
Yang in OpenDaylight
 
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objectsBacking Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
 
Alfresco Backup and Recovery Tool: a real world backup solution for Alfresco
Alfresco Backup and Recovery Tool: a real world backup solution for AlfrescoAlfresco Backup and Recovery Tool: a real world backup solution for Alfresco
Alfresco Backup and Recovery Tool: a real world backup solution for Alfresco
 
Data-Center Replication with Apache Accumulo
Data-Center Replication with Apache AccumuloData-Center Replication with Apache Accumulo
Data-Center Replication with Apache Accumulo
 
Why Plone Will Die
Why Plone Will DieWhy Plone Will Die
Why Plone Will Die
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?
 
.NET Core in the Real World
.NET Core in the Real World.NET Core in the Real World
.NET Core in the Real World
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
 
Symfony 2 under control
Symfony 2 under controlSymfony 2 under control
Symfony 2 under control
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)
 
OPNFV: Platform Performance Acceleration
OPNFV: Platform Performance AccelerationOPNFV: Platform Performance Acceleration
OPNFV: Platform Performance Acceleration
 
What is OPNFV? What does it deliver?
What is OPNFV? What does it deliver?What is OPNFV? What does it deliver?
What is OPNFV? What does it deliver?
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
 
Plone migrations using plone.restapi
Plone migrations using plone.restapiPlone migrations using plone.restapi
Plone migrations using plone.restapi
 
Plone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, BelgiumPlone 5.2 migration at University Ghent, Belgium
Plone 5.2 migration at University Ghent, Belgium
 

Viewers also liked (6)

Biology in Focus - Chapter 6
Biology in Focus - Chapter 6Biology in Focus - Chapter 6
Biology in Focus - Chapter 6
 
Biology in Focus - Chapter 7
Biology in Focus - Chapter 7Biology in Focus - Chapter 7
Biology in Focus - Chapter 7
 
Biology in Focus Chapter 5
Biology in Focus Chapter 5Biology in Focus Chapter 5
Biology in Focus Chapter 5
 
Biology in Focus - Chapter 14
Biology in Focus - Chapter 14Biology in Focus - Chapter 14
Biology in Focus - Chapter 14
 
Biology in Focus Chapter 4
Biology in Focus Chapter 4Biology in Focus Chapter 4
Biology in Focus Chapter 4
 
Biology in Focus - Chapter 10
Biology in Focus - Chapter 10Biology in Focus - Chapter 10
Biology in Focus - Chapter 10
 

Similar to Continuing Evolution of Perl: Highlights of ActivePerl 5.14

Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)
Puppet
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 

Similar to Continuing Evolution of Perl: Highlights of ActivePerl 5.14 (20)

Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
 
Enterprise Perl
Enterprise PerlEnterprise Perl
Enterprise Perl
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
 
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
 
Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
Spring Roo Add-On Development & Distribution
Spring Roo Add-On Development & DistributionSpring Roo Add-On Development & Distribution
Spring Roo Add-On Development & Distribution
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
CBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and BeyondCBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and Beyond
 
Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5Perl family: 15 years of Perl 6 and Perl 5
Perl family: 15 years of Perl 6 and Perl 5
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Stackato
StackatoStackato
Stackato
 
Upgrading to Alfresco 6
Upgrading to Alfresco 6Upgrading to Alfresco 6
Upgrading to Alfresco 6
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Ekon24 mORMot 2
Ekon24 mORMot 2Ekon24 mORMot 2
Ekon24 mORMot 2
 
EKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfEKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdf
 
SCAPE Information Day at BL - Some of the SCAPE Outputs Available
SCAPE Information Day at BL - Some of the SCAPE Outputs AvailableSCAPE Information Day at BL - Some of the SCAPE Outputs Available
SCAPE Information Day at BL - Some of the SCAPE Outputs Available
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
 

More from ActiveState

Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
ActiveState
 
US SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial ModelingUS SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial Modeling
ActiveState
 
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
ActiveState
 

More from ActiveState (20)

Robust Algorithms for Machine Learning
Robust Algorithms for Machine LearningRobust Algorithms for Machine Learning
Robust Algorithms for Machine Learning
 
TDD Pros & Cons
TDD Pros & ConsTDD Pros & Cons
TDD Pros & Cons
 
ActiveState - The Open Source Languages Company
ActiveState - The Open Source Languages CompanyActiveState - The Open Source Languages Company
ActiveState - The Open Source Languages Company
 
ActiveState Open Source Survey - 2016
ActiveState Open Source Survey - 2016ActiveState Open Source Survey - 2016
ActiveState Open Source Survey - 2016
 
ActiveState Tcl Survey - 2016
ActiveState Tcl Survey - 2016ActiveState Tcl Survey - 2016
ActiveState Tcl Survey - 2016
 
Practical LPeg - Lua Workshop 2016
Practical LPeg - Lua Workshop 2016Practical LPeg - Lua Workshop 2016
Practical LPeg - Lua Workshop 2016
 
Overview of Komodo IDE 10.1
Overview of Komodo IDE 10.1Overview of Komodo IDE 10.1
Overview of Komodo IDE 10.1
 
The ActiveState of Tcl
The ActiveState of TclThe ActiveState of Tcl
The ActiveState of Tcl
 
PERL SURVEY 2016
PERL SURVEY 2016PERL SURVEY 2016
PERL SURVEY 2016
 
Improving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePythonImproving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePython
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua Franca
 
Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
US SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial ModelingUS SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial Modeling
 
ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...
 
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
 
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
 
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
 
Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic LanguagesTake Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
 
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Continuing Evolution of Perl: Highlights of ActivePerl 5.14

  • 1. The Evolution of Perl: Highlights of Perl 5.14 and what's new in the Perl world
  • 2. Agenda • Perl, ActivePerl, and ActiveState • Version support – from the community and ActiveState • What's new in Perl 5.14 • Re-factoring or maintaining existing code • Web frameworks and Plack/PSGI • Running Perl applications in the cloud
  • 3. Perl • Created by Larry Wall in 1987 • Perl 5 released in 1995 – language syntax stabilizes – first “extensible” version (use Some::Module) • Continued improvements through the 5.x series • Perl 6 – beyond the scope of this presentation – essentially a new language – a language specification, not an official compiler – Rakudo and other compilers available for early adopters
  • 4. ActivePerl • ActiveState contracted by Microsoft to improve Perl performance and features for Windows • ActivePerl enhancements submitted back to core Perl • ActivePerl helps popularize Perl – 2 million downloads per year • adds some useful things – PPM (Perl Package Manager) – PerlCritic (from Perl Dev Kit) – PerlScript and Perl for ISAPI extensions
  • 5. & PPM • CPAN is a 'one stop shop' for user-created modules – standard toolchain for building, testing, and installing modules – searchable – standardized documentation format – bug tracking – HUGE: 23,000 modules (distributions) • PPM is ActivePerl's client for installing these modules – command line and GUI interface – pre-compiled packages for specific platforms and Perl versions – dependencies handled automatically – provides most modules on CPAN (around 13,000 packages per platform)
  • 6. Perl Releases • Perl releases used to be feature-based until 5.10 – released “when it's done” • time-based releases since Perl 5.12 (April 2010) – no feature milestones to define the release – only features ready by release-time will be included – predictable upgrade schedule
  • 7. Perl Support Policy • Perl community supports the most recent two releases – new features – security patches – bug fixes • ActiveState mirrors this policy for Community Edition • Older versions available through Business Edition, Enterprise Edition and OEM – extended support – professional services
  • 8. What's new in Perl 5.14 • Unicode improvements • Reliable exception handling • Non-destructive substitution • more...
  • 9. Unicode • Unicode 6.0 almost fully supported • N{NAME} and charnames enhancements • use feature 'unicode_strings'
  • 10. Regular Expressions • New character set modifiers: – /a ASCII – /d Default (or dodgy) – /l Locale – /u Unicode • Caution: Modified stringification! for example: qr/foo/i – Old: (?i-xsm:foo) – New: (?^i:foo)
  • 11. Non-destructive substitution (my $copy = $orig) =~ s/cat/dog/; my $copy = $orig =~ s/cat/dog/r; my @copy = map { (my $copy = $_) =~ s/cat/dog/; $copy } @orig; my @copy = map { s/cat/dog/r } @orig;
  • 12. Exception Handling • Problems: – eval() in DESTROY methods – die() in DESTROY methods – local $@ • Solution: – Set $@ as late as possible before exiting the eval scope • Exceptions are now a lot more reliable
  • 13. Don’t use smart-match • Smart match operator ~~ introduced in 5.10.0 • “Fixed” in 5.10.1 because is wasn’t working • Still considered “too smart for it’s own good” • Over 20 rules on how it works • Rules apply recursively for container types • May be replaced by “dump match” in the future • All this applies to the given/when statements too.
  • 14. Maintaining or updating Perl code Try running it with with a newer interpreter – it may just work. The interpreter will warn about deprecated code – incremental approach: 5.8 to 5.10 to 5.12 to 5.14 • use warnings; • less likely to “break” existing code • setting up each environment takes time and effort – direct approach: upgrading directly to 5.14 • address all the incompatibilities at once • opportunity to re-factor and use new language features • great excuse to write automated tests! – write tests for the old version first, then run them against 5.12
  • 15. Consult perldelta • each Perl release has a list of differences and incompatibilities with the previous version – http://perldoc.perl.org/index-history.html – also in the ActivePerl documentation • pay particular attention to the Incompatible Changes section • don't skip a major version – the perldeltas are not cumulative - going from 5.10 to 5.14, check the 5.12 delta – you can skip odd numbered development releases (5.9, 5.11, etc.)
  • 16. Check all modules • binary modules are NOT compatible between major Perl versions (e.g. 5.12 to 5.14) • update to the latest modules where possible • using PPM helps (ppm profile ...) • Check the module's Changes file and documentation
  • 17. Use Perl::Critic • Perl::Critic – for examining your source code – uses Conway's “Perl Best Practices” – points out bad or deprecated code and suggests alternatives • ActivePerl has a helpful GUI interface – added in 5.12 – formerly part of the Perl Dev Kit
  • 18. ... or don't upgrade • You may choose not to upgrade to 5.12 or 5.14 – there are commercial support options: • ActivePerl Business Edition provides access to older builds of ActivePerl • ActivePerl Enterprise Edition can provide access and support for specific versions and platform builds • OEM licensing lets you distribute ActivePerl with your product
  • 19. Web Frameworks and Plack/PSGI • Catalyst • Mojolicious • Dancer ... all work with Plack/PSGI • interface between Perl web applications and web servers • simplifies web application deployment
  • 20. Catalyst • most popular framework in a recent ActiveState survey – relatively speaking, it's been around a long time (2005) – wide enterprise adoption • a “heavyweight” framework – many dependencies – very “TMTOWTDO” design, lots of choices for sub- components – very flexible
  • 21. Mojolicious • new web framework from author of Catalyst, Sebastian Riedel • Mojo originally intended as a rewrite of Catalyst internals • lighter weight – fewer dependencies – “optimized for user-friendliness”
  • 22. Dancer • micro-framework • for smaller sites, web services, or people who just prefer a very lightweight framework • similar to Ruby's Sinatra or Python's Flask
  • 23. Perl in the cloud The Platform as a Service approach proved very popular in the Ruby on Rails community – has also caught on with other languages and frameworks • a framework for frameworks... – not a PaaS... it's for creating your own PaaS – supports multiple languages and frameworks – Perl web apps via PSGI – based on Cloud Foundry – more accessible for Perl and Python developers – http://activestate.com/cloud
  • 24. Thank You Speak to a representative about ActivePerl Business Edition, Enterprise Edition or OEM: 1-866-510-2914 business-solutions@activestate.com www.activestate.com 08/12/10