Does what it says on the tin. An introduction to Modern Perl programming aimed at programmers who have little or no experience in Perl.
I gave this course at the London Perl Workshop in November 2013.
This document summarizes a presentation about building web applications in Perl using PSGI and Plack. It discusses:
- The history of CGI and its problems with performance
- How mod_perl and other environments addressed these issues but reduced portability
- How PSGI separates web application processing from deployment, allowing applications to run on different servers and frameworks
- A PSGI application is defined as a code reference that returns a response as an array reference
- Plack provides helpers like Plack::Request and Plack::Response to simplify building PSGI applications
- Template Toolkit can be used to separate HTML templates from application code
- User input can be accessed from the environment hash or Plack::Request object
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
Hello, unfrozen Paleolithic Perl programmers! Welcome to 2016!
First, let’s start with the good news: yes, we’re still programming in Perl5 in 2016 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate “Big Giant Hole in Ice” incident, will likely still work just fine on the current release of Perl5 — even if you originally wrote it against Perl 4 or even Perl 3.
Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!
But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!
Delivered at OpenWest 2016, 14 July 2016
This document summarizes a presentation about the Aura PHP library. It discusses that Aura is an independent and decoupled PHP library that started as a rewrite of the SolarPHP framework. The presentation covers the key principles of Aura, including its package and library organization. Specific Aura libraries are summarized, including the Router and Filter libraries, how to use rules with the Filter library, and how to create custom rules. It concludes by mentioning other Aura libraries and frameworks.
The document discusses using Perl on the command line. It provides examples of using one-liners with flags like -e, -p, and -n to manipulate or filter data without writing scripts. Specific applications demonstrated include parsing log files, sorting/counting words, and solving word puzzles by manipulating strings. The document emphasizes how Perl on the command line allows ad hoc data munging and analysis tasks in just a few lines of code.
How do we go from your Java code to the CPU assembly that actually runs it? Using high level constructs has made us forget what happens behind the scenes, which is however key to write efficient code.
Starting from a few lines of Java, we explore the different layers that constribute to running your code: JRE, byte code, structure of the OpenJDK virtual machine, HotSpot, intrinsic methds, benchmarking.
An introductory presentation to these low-level concerns, based on the practical use case of optimizing 6 lines of code, so that hopefully you to want to explore further!
Presentation given at the Toulouse (FR) Java User Group.
Video (in french) at https://www.youtube.com/watch?v=rB0ElXf05nU
Slideshow with animations at https://docs.google.com/presentation/d/1eIcROfLpdTU2_Z_IKiMG-AwqZGZgbN1Bs2E0nGShpbk/pub?start=true&loop=false&delayms=60000
Doctrine 2.0 Enterprise Persistence Layer for PHPGuilherme Blanco
One area that was mostly abandoned in applications is the Model layer. Doctrine is a project that brings enterprise support this layer through a powerful ORM implementation.
Allied with new support introduced in PHP 5.3, Doctrine 2.0 brings the concept of ORM in PHP to the next level. It introduces a couple of concepts known from other languages and areas, like Annotations, Object Query Languages and Parsers. This talk will introduce these new concepts as well as explain most of its architecture.
PHP isn't only used as a web-based scripting language, it can also be used on the command line.
This talks explains the benefits of command line PHP. Additionally, process control using CLI PHP is explained.
This document discusses new features in PHP 8.1, including enums and fibers. Enums allow for defining enumerated types that can contain members, methods, and backed values. Fibers enable lightweight concurrency in PHP through cooperative multitasking. Example code is provided to demonstrate how enums can be used to represent application states and fiber functions can be suspended and resumed to run code concurrently without blocking. The document also briefly mentions readonly properties as another new feature in PHP 8.1.
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
Hello, unfrozen Paleolithic Perl programmers! Welcome to 2015!
First, let’s start with the good news: yes, we’re still programming in Perl5 in 2015 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate "Big Giant Hole in Ice" incident, will likely still work just fine on the current release of Perl5 -- even if you originally wrote it against Perl 4 or even Perl 3.
Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!
But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!
#Pharo Days 2016 Data Formats and ProtocolsPhilippe Back
The document discusses various data formats and protocols for building bridges between Pharo and the outside world.
It describes common data formats like CSV, JSON, and XML that can be used to serialize and deserialize Pharo objects to and from streams. It provides examples of parsing and generating data in these formats using libraries like NeoCSV and NeoJSON.
It also discusses common protocols like HTTP, filesystem I/O, and subprocesses that can be used to communicate with external systems. Specific examples covered are the memcached protocol and using Zinc for HTTP client/server communication.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
Reactive programming models asynchronous data streams as signals that produce events over time. ReactiveCocoa is a framework that implements reactive programming in Objective-C. It uses signals to represent asynchronous data streams and operators to transform and combine signals. ReactiveCocoa code separates the logic to produce and consume data, making it more modular, reusable, testable and by reducing state and mutability. While the syntax is different, learning to think reactively can improve code quality and stability.
What You Need to Know About Lambdas - Jamie Allen (Typesafe)jaxLondonConference
This document summarizes Jamie Allen's presentation on lambdas. Some key points:
- Lambdas are anonymous functions that are limited in scope and difficult to test and debug in isolation.
- Using named functions instead of lambdas can help with readability and debugging by showing the function name in stack traces, but the name may still be mangled.
- Lambdas have access to variables in enclosing scopes, which can cause problems if mutable state is closed over.
- To maintain functional programming benefits while improving maintainability, techniques like "lifting" methods to treat them as first-class functions can help. This allows showing the method name in stack traces.
Hooray, open source Swift finally arrived on Linux in December. Let’s see how easy it is to use Swift for your backend and why Swift is a good choice for safe and fast development.
Video links: Part 1 : http://www.youtube.com/watch?v=lWSV4JLLJ8E Part2 : http://www.youtube.com/watch?v=-MvSBqPlMdY
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
This document provides an overview and introduction to LINQ (Language Integrated Query). It discusses key LINQ concepts like LINQ to SQL, LINQ providers, extension methods, lambda expressions, and expression trees. It explains that LINQ allows querying over various data sources using a consistent SQL-like syntax. The document also previews upcoming sections on LINQ usage, performance, advanced topics, and references additional learning resources.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
Lambdas and Streams Master Class Part 2José Paumard
These are the slides of the talk we made with Stuart Marks at Devoxx Belgium 2018. This second part covers the Stream API, reduction and the Collector API.
What is the state of lambda expressions in Java 11? Lambda expressions are the major feature of Java 8, having an impact on most of the API, including the Streams and Collections API. We are now living the Java 11 days; new features have been added and new patterns have emerged. This highly technical Deep Dive session will visit all these patterns, the well-known ones and the new ones, in an interactive hybrid of lecture and laboratory. We present a technique and show how it helps solve a problem. We then present another problem, and give you some time to solve it yourself. Finally, we present a solution, and open for questions, comments, and discussion. Bring your laptop set up with JDK 11 and your favorite IDE, and be prepared to think!
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
Plack is an interface for web request handlers that simplifies the interface and makes code more portable. It allows developers to focus on request handling rather than API specifics. Plack addresses issues with traditional CGI and mod_perl approaches by running handlers outside of servers in a standardized way. This encapsulation improves performance, debugging, and code reuse across different server implementations. Plack includes modules for common tasks like routing, middleware, and running PSGI applications on various web servers.
This document provides an overview of basic JavaScript concepts including variables, functions, conditional statements, loops and recursion. It includes code examples and assignments for each concept. The assignments demonstrate core JavaScript syntax and increase in complexity, covering if/else statements, switch cases, while/do-while/for loops, and recursive functions for calculating factorials and Fibonacci series. Later assignments involve more complex tasks like printing multiple patterns and combining different statements. The document serves as a learning guide for JavaScript fundamentals.
This document provides an overview of the speaker's experience with programming languages and introduction to functional programming concepts. It discusses that the speaker was initially taught imperative languages like BASIC and C++ in college but was also exposed to Lisp, an early functional language. Several core FP concepts pioneered by Lisp like recursion, higher-order functions, and homoiconicity are explained. The document advocates using some FP principles like immutability and map/filter/reduce in other languages to gain benefits while not needing to be a "pure" functional programmer.
PHP 7.1 is all ready to replace 7.0, adding even more features and goodness to the ground-breaking previous version.
Visibility for class constant, key specifications for list, void return type, mcrypt() deprecation, negative offset and warning for integer conversion.
We'll cover new features, deprecated ones and incompatibilities, so you're ready for your next migration.
Zephir - A Wind of Change for writing PHP extensionsMark Baker
Zephir is a high-level domain-specific language that simplifies creating and maintaining native PHP extensions in C. It was developed by the team behind Phalcon to make it easier for developers to write low-level PHP extensions. Zephir compiles to C code and generates PHP extensions. It supports object-oriented programming and common control structures like if/else statements, while loops, and for loops. Zephir code is type safe and supports type hints.
The document discusses scraping the Tower Bridge website for lift schedule data and converting it to an iCalendar format. It describes various challenges encountered like timezones and validation issues. The author ultimately creates a simple website hosting the daily rebuilt iCalendar feed of Tower Bridge lift times.
Object-Oriented Programming with Perl and MooseDave Cross
This document contains the slides from a presentation on object oriented programming with Perl and Moose. The presentation covers an introduction to object oriented programming concepts, how OOP is implemented in Perl, and how the Moose toolkit makes OOP easier in Perl. Specific topics covered include classes and objects, methods, attributes, subclasses, and declarative attributes with Moose.
PHP isn't only used as a web-based scripting language, it can also be used on the command line.
This talks explains the benefits of command line PHP. Additionally, process control using CLI PHP is explained.
This document discusses new features in PHP 8.1, including enums and fibers. Enums allow for defining enumerated types that can contain members, methods, and backed values. Fibers enable lightweight concurrency in PHP through cooperative multitasking. Example code is provided to demonstrate how enums can be used to represent application states and fiber functions can be suspended and resumed to run code concurrently without blocking. The document also briefly mentions readonly properties as another new feature in PHP 8.1.
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
Hello, unfrozen Paleolithic Perl programmers! Welcome to 2015!
First, let’s start with the good news: yes, we’re still programming in Perl5 in 2015 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate "Big Giant Hole in Ice" incident, will likely still work just fine on the current release of Perl5 -- even if you originally wrote it against Perl 4 or even Perl 3.
Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!
But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!
#Pharo Days 2016 Data Formats and ProtocolsPhilippe Back
The document discusses various data formats and protocols for building bridges between Pharo and the outside world.
It describes common data formats like CSV, JSON, and XML that can be used to serialize and deserialize Pharo objects to and from streams. It provides examples of parsing and generating data in these formats using libraries like NeoCSV and NeoJSON.
It also discusses common protocols like HTTP, filesystem I/O, and subprocesses that can be used to communicate with external systems. Specific examples covered are the memcached protocol and using Zinc for HTTP client/server communication.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
Reactive programming models asynchronous data streams as signals that produce events over time. ReactiveCocoa is a framework that implements reactive programming in Objective-C. It uses signals to represent asynchronous data streams and operators to transform and combine signals. ReactiveCocoa code separates the logic to produce and consume data, making it more modular, reusable, testable and by reducing state and mutability. While the syntax is different, learning to think reactively can improve code quality and stability.
What You Need to Know About Lambdas - Jamie Allen (Typesafe)jaxLondonConference
This document summarizes Jamie Allen's presentation on lambdas. Some key points:
- Lambdas are anonymous functions that are limited in scope and difficult to test and debug in isolation.
- Using named functions instead of lambdas can help with readability and debugging by showing the function name in stack traces, but the name may still be mangled.
- Lambdas have access to variables in enclosing scopes, which can cause problems if mutable state is closed over.
- To maintain functional programming benefits while improving maintainability, techniques like "lifting" methods to treat them as first-class functions can help. This allows showing the method name in stack traces.
Hooray, open source Swift finally arrived on Linux in December. Let’s see how easy it is to use Swift for your backend and why Swift is a good choice for safe and fast development.
Video links: Part 1 : http://www.youtube.com/watch?v=lWSV4JLLJ8E Part2 : http://www.youtube.com/watch?v=-MvSBqPlMdY
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
This document provides an overview and introduction to LINQ (Language Integrated Query). It discusses key LINQ concepts like LINQ to SQL, LINQ providers, extension methods, lambda expressions, and expression trees. It explains that LINQ allows querying over various data sources using a consistent SQL-like syntax. The document also previews upcoming sections on LINQ usage, performance, advanced topics, and references additional learning resources.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
Lambdas and Streams Master Class Part 2José Paumard
These are the slides of the talk we made with Stuart Marks at Devoxx Belgium 2018. This second part covers the Stream API, reduction and the Collector API.
What is the state of lambda expressions in Java 11? Lambda expressions are the major feature of Java 8, having an impact on most of the API, including the Streams and Collections API. We are now living the Java 11 days; new features have been added and new patterns have emerged. This highly technical Deep Dive session will visit all these patterns, the well-known ones and the new ones, in an interactive hybrid of lecture and laboratory. We present a technique and show how it helps solve a problem. We then present another problem, and give you some time to solve it yourself. Finally, we present a solution, and open for questions, comments, and discussion. Bring your laptop set up with JDK 11 and your favorite IDE, and be prepared to think!
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
HHVM is currently gaining popularity at quite a pace, and it's a pretty exciting time for PHP runtimes. Have you ever wondered what is going on beneath this slick and super-speedy engine? I wondered that myself, so I dived into the internals of HHVM, discovering a treasure trove of awesome stuff. In this talk, I'll show you how HHVM itself works with a guided tour of the codebase, demonstrating how it all pieces together. I'll also show you a couple of ways to write your own incredible HHVM extension. You don't need to know C++ to understand this talk - just PHP language knowledge is enough.
Plack is an interface for web request handlers that simplifies the interface and makes code more portable. It allows developers to focus on request handling rather than API specifics. Plack addresses issues with traditional CGI and mod_perl approaches by running handlers outside of servers in a standardized way. This encapsulation improves performance, debugging, and code reuse across different server implementations. Plack includes modules for common tasks like routing, middleware, and running PSGI applications on various web servers.
This document provides an overview of basic JavaScript concepts including variables, functions, conditional statements, loops and recursion. It includes code examples and assignments for each concept. The assignments demonstrate core JavaScript syntax and increase in complexity, covering if/else statements, switch cases, while/do-while/for loops, and recursive functions for calculating factorials and Fibonacci series. Later assignments involve more complex tasks like printing multiple patterns and combining different statements. The document serves as a learning guide for JavaScript fundamentals.
This document provides an overview of the speaker's experience with programming languages and introduction to functional programming concepts. It discusses that the speaker was initially taught imperative languages like BASIC and C++ in college but was also exposed to Lisp, an early functional language. Several core FP concepts pioneered by Lisp like recursion, higher-order functions, and homoiconicity are explained. The document advocates using some FP principles like immutability and map/filter/reduce in other languages to gain benefits while not needing to be a "pure" functional programmer.
PHP 7.1 is all ready to replace 7.0, adding even more features and goodness to the ground-breaking previous version.
Visibility for class constant, key specifications for list, void return type, mcrypt() deprecation, negative offset and warning for integer conversion.
We'll cover new features, deprecated ones and incompatibilities, so you're ready for your next migration.
Zephir - A Wind of Change for writing PHP extensionsMark Baker
Zephir is a high-level domain-specific language that simplifies creating and maintaining native PHP extensions in C. It was developed by the team behind Phalcon to make it easier for developers to write low-level PHP extensions. Zephir compiles to C code and generates PHP extensions. It supports object-oriented programming and common control structures like if/else statements, while loops, and for loops. Zephir code is type safe and supports type hints.
The document discusses scraping the Tower Bridge website for lift schedule data and converting it to an iCalendar format. It describes various challenges encountered like timezones and validation issues. The author ultimately creates a simple website hosting the daily rebuilt iCalendar feed of Tower Bridge lift times.
Object-Oriented Programming with Perl and MooseDave Cross
This document contains the slides from a presentation on object oriented programming with Perl and Moose. The presentation covers an introduction to object oriented programming concepts, how OOP is implemented in Perl, and how the Moose toolkit makes OOP easier in Perl. Specific topics covered include classes and objects, methods, attributes, subclasses, and declarative attributes with Moose.
The document discusses rewriting some of Matt's original Perl scripts to use modern best practices like PSGI, CPAN modules, and web frameworks. It provides examples of simple programs - like displaying a random text phrase or image - that were rewritten using techniques like Dancer and Mojolicious. The goal is to provide updated, easy to understand examples of web programming in Perl for beginners to learn from.
A study of the local tribes of Assam - Bodo under ISA by the students of SBGJsbgjbritishcouncil
The Bodo tribe lives in the plains valleys of Assam, India. They are an agrarian tribe who traditionally farmed rice and practiced irrigation. Bodo villages have a patriarchal family structure led by the father and village priest. The Bodo celebrate several seasonal and religious festivals throughout the year, with Kherai being their most important national festival. While some Bodos follow Christianity or Hinduism, many keep to their ancient animist Bathou faith which has similarities to Hindu beliefs. The Bodo language is promoted in schools in Bodo areas and uses the Devanagari script. Traditional Bodo cuisine and dress reflect their culture and preference for non-vegetarian foods like fish and pork. In recent decades,
I had include a video inside the presentation. The video will not work, if you want to see the video this is the website for it : http://www.youtube.com/watch?v=MlRpp68Zg1U. Also, I insert the video after slide 17.
The document discusses several Indian tribes:
1. The Apatanis tribe lives in the lower Subansiri district of Arunachal Pradesh and are considered one of the most advanced tribes in the state. However, little archaeological evidence exists about their origins.
2. The Abujmaria tribe lives in the mountain regions of Madhya Pradesh and were once considered a sub-group of the Gonds tribe. They generally speak Abujmaria, a Dravidian language.
3. The document then discusses the Adiwasi Girasia tribe of Gujarat, and details some of their religious beliefs, daily lives, and food and farming practices.
This document provides information about the state of Assam in India. It discusses Assam's history of being ruled by the Ahoms dynasty in the 13th century. It notes some of Assam's major cities, districts, and current leadership. It also describes some key aspects of Assam's culture, including the use of gamosa cloth and bihu festivals. Additionally, the summary highlights Assam's biodiversity like the Kaziranga National Park and tea production industry.
A study of the local tribes of Assam and Egypt under ISA by the students of S...sbgjbritishcouncil
The document provides information about three different tribes - the Bedouin tribe of Egypt, the Kogi tribe of Columbia, and the Bodo tribe of North East India.
For the Bedouin tribe, it discusses their culture of adapting to the harsh desert conditions, their traditional cuisine of cooking over open fires and eating with hands, their distinctive traditional dress including the keffiyeh head covering, and their religious beliefs as predominantly Sunni Muslim.
It then discusses the Kogi tribe's descent from the advanced pre-Columbian Tairona culture, their spiritual beliefs centered around "The Great Mother" and sacred mountains, their coming-of-age tradition of receiving a poporo gourd, and both
Moose is an object framework for Perl that provides:
1) Full-featured object-oriented programming with attributes, inheritance, roles, and hooks
2) Powerful attribute features like types, defaults, builders, and more
3) A clean and stable API for defining and working with objects
This document provides an overview of object-oriented programming concepts and Moose, a object system for Perl 5. It covers introducing OOP, the basics of classes, objects, methods and attributes. It then discusses Moose specifically, including declaring classes and attributes, subclasses, and best practices. The goal is to provide an introduction to OO programming in Perl using Moose.
Over the last eight years, the author has had three ideas: 1) Cultured Perl, a blogging site that died. 2) A dead Perl magazine. 3) Getting out of the "echo chamber" by publishing a Perl online magazine on Medium called "Cultured Perl" to reach a wider audience outside of typical Perl communities. The author provides details on publishing articles for "Cultured Perl" on Medium and encourages submitting YAPC reviews to the site.
Perl hosting for beginners - Cluj.pm March 2013Arpad Szasz
This document provides instructions for beginner Perl web developers to host a simple dynamic website using Perl and shared hosting. It recommends using Strawberry Perl on Windows, Apache as the web server, and the Mojolicious framework. It includes steps to configure Apache and Mojolicious, add templates, and an .htaccess file to route requests to the Perl application. The templates can include Perl code and are deployed along with the application code via FTP to a shared hosting server.
This document provides an overview of the history and development of Perl web development, introducing the Common Gateway Interface (CGI) model and its limitations. It describes how mod_perl helped address these issues but lacked portability. The PSGI specification and Plack implementation are presented as a solution, providing a common interface between Perl web applications and web servers. Key aspects of building PSGI applications, such as templates, user input handling, and middleware, are demonstrated. Major frameworks and servers supporting PSGI are also noted.
Introduction to Web Programming with PerlDave Cross
This document provides an introduction to creating dynamic web pages using Perl and CGI (Common Gateway Interface). It covers the basics of HTTP requests and responses, how CGI allows programs to generate dynamic output for the web server, and using Perl and the CGI.pm module to write simple CGI programs. These programs can accept input from HTML forms, handle GET and POST requests, and produce various types of output like text, HTML and images. Debugging techniques are also discussed. The document concludes with a section on web security and potential vulnerabilities in CGI programs.
Database Programming with Perl and DBIx::ClassDave Cross
The document provides an overview of a training course on database programming with Perl and DBIx::Class. It discusses relational databases and concepts like relations, tuples, attributes, primary keys and foreign keys. It then covers how to interface with databases from Perl using the DBI module and drivers. It introduces object-relational mapping and the DBIx::Class module for mapping database rows to objects. It shows how to define DBIx::Class schema and result classes to model database tables and relationships.
The document provides information about the Indian state of Assam. It discusses that Assam is known as one of the seven sister states of North India and is famous for its tea production, contributing 50% of India's total tea. It outlines details about Assam's history, climate, culture, festivals, education system, agriculture, tourism, industries and natural resources. In conclusion, it restates that Assam has a significant role in India's economy due to its large tea production industry and well-developed university infrastructure.
This document provides information about the Indian state of Assam. It notes that Assam contains diverse geographical regions like the Himalayas and Brahmaputra Plain. The capital city of Assam is Dispur, a suburb of Guwahati, the largest city. Traditional Assamese dress includes the Dhoti and Gamosa for men and the Mekhela Chadar for women. The cuisine is unique and centered around rice and fish since the climate allows for farming and fishing. Some important tourist attractions mentioned are the Kamakhya Temple in Guwahati, the Umananda Temple on Peacock Island in the Brahmaputra River, and the national parks of Manas and Kaziranga.
Perl 6 is a specification for a new version of the Perl programming language. It defines the language rather than being an implementation. There are several implementations including Rakudo, which passes 79% of the test spec. Perl 6 introduces many new features and changes compared to Perl 5, such as new variable and operator syntax. It is still under development with the spec and implementations continuing to evolve toward completion.
This document summarizes upcoming language features in Java, including local variable type inference, raw string literals, expression switch, pattern matching, records, and value types. It discusses the motivation and design of each feature, providing examples. The document indicates that Java releases will now occur every six months and language changes will be more frequent, with new features targeting each release.
The speech is timed to the coming release of PHP7 and is intended to review the state of the language and to give a slap for those who still hesitate to make use of available features.
This document summarizes the key changes and new features in PHP 5.6, which was released in August 2014. It provides details on the release process and timeline. Some major additions in 5.6 included constant scalar expressions, variadic functions, argument unpacking, and the power operator. Other improvements included better SSL/TLS support, the new phpdbg debugging tool, and performance enhancements. The document also outlines some backwards incompatible changes and deprecated features.
Lambdas and streams are key new features in Java 8. Lambdas allow blocks of code to be passed around as if they were objects. Streams provide an abstraction for processing collections of objects in a declarative way using lambdas. Optional is a new class that represents null-safe references and helps avoid null pointer exceptions. Checked exceptions can cause issues with lambdas, so helper methods are recommended to convert checked exceptions to unchecked exceptions.
javase8bestpractices-151015135520-lva1-app6892SRINIVAS C
This document provides an overview of Java SE 8 best practices according to Stephen Colebourne based on over a year of using Java 8. Some key best practices discussed include using lambdas and functional interfaces to improve code readability and abstraction, replacing checked exceptions with unchecked exceptions when using lambdas, using Optional to replace null references on public APIs and return types, leveraging the Stream API for processing collections but not overusing it, and adopting the new Date and Time API to replace Java Date/Calendar.
This document provides an overview and best practices for using new features introduced in Java SE 8, based on the author's experience using Java SE 8 for over a year. It covers lambdas, functional interfaces, exceptions, Optional, and streams. The author advocates following best practices such as using expression lambdas over block lambdas, avoiding unnecessary type declarations, and handling exceptions carefully when using functional interfaces. The document also discusses approaches for using Optional to replace null values.
This is the first set of slightly updated slides from a Perl programming course that I held some years ago for the QA team of a big international company.
I want to share it with everyone looking for intransitive Perl-knowledge.
The updates after 1st of June 2014 are made with the kind support of Chain Solutions (http://chainsolutions.net/)
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
Perl - laziness, impatience, hubris, and one linersKirk Kimmel
Perl provides tools like perldoc, cpan, and Perl::Tidy to help developers work more efficiently. One-liners allow running Perl commands and programs directly from the command line. ExtUtils::Command provides functions that emulate common shell commands to make Perl scripts more portable. Perl::Tidy can reformat code to make it more readable.
Go is a general purpose programming language created by Google. It is statically typed, compiled, garbage collected, and memory safe. Go has good support for concurrency with goroutines and channels. It has a large standard library and integrates well with C. Some key differences compared to other languages are its performance, explicit concurrency model, and lack of classes. Common data types in Go include arrays, slices, maps, structs and interfaces.
This document summarizes the key changes, enhancements, and new features introduced in PHP 7.X. It discusses performance improvements observed in PHP 7 compared to earlier versions. It also outlines new features introduced in each PHP 7 sub-release like PHP 7.0.X, 7.1.X, and 7.2.X, including scalar type declarations, return type declarations, and nullable types. The document additionally notes deprecated and removed features for each sub-release.
The document provides an overview of the Go programming language. It discusses that Go was designed by Google to help solve their large-scale programming problems. It then summarizes Go's history, purpose, features, and syntax elements such as data types, operators, functions, concurrency using goroutines and channels. The document also provides examples of Go code and concludes that Go has emerged as a popular language for cloud infrastructure due to its simplicity, concurrency, and performance.
PHP 7.X provides major performance improvements over PHP 5.6. Benchmark tests showed WordPress running 2.7x faster on PHP 7 than PHP 5.6. New features in PHP 7 include scalar type declarations, return type declarations, the null coalescing operator, and anonymous classes. PHP 7.1 introduced nullable types, void functions, and catch exception handling. PHP 7.2 includes support for Argon2 password hashing and deprecates create_function().
This is a slide for lecture in topic of super introduction to Laravel for Lecture in 31/10/2016 at 9:30.
SCL706, Applied Computer Science, KMUTT, Bangkok, Thailand.
CQL is a structured query language for Apache Cassandra that is similar to SQL. It provides an alternative interface to the existing Thrift API, with the goals of being more stable, easier to use, and providing a better mental model for querying and data. The document outlines the motivations for developing CQL, including limitations of the existing Thrift API, and provides details on CQL specification, drivers, and additional resources.
This document discusses why Ruby is a good programming language for operations staff. It notes that operations involves tasks like building servers, packaging, monitoring, and provisioning that can be programmed. While shell scripts and Perl are commonly used today, Ruby has advantages like allowing multiple versions of the same library, being beginner friendly due to tutorials and syntax, and its use of blocks for iteration, cleanup and separating concerns. Ruby also has good tooling for devops tasks like configuration management, logging and packaging that operations staff can benefit from due to the ability to write plugins for these tools.
This document provides a summary of Perl's modern features and history from versions 1 through 5.26. It describes key additions and changes over time such as lexical filehandles in 5.6, three argument open in 5.8, and major new features introduced in 5.10 like say and state. It emphasizes that Perl development is ongoing with thousands of bug fixes and improvements made in each release beyond the new features highlighted.
This document discusses measuring the quality of Perl code. It recommends finding proxy measures of quality like test passes, test coverage, conforming to best practices (Perl Critic), and complexity (cyclomatic complexity). Continuous integration systems like Travis CI can automate measuring these proxies on each commit. Services like Coveralls and Kritika integrate with Travis to measure coverage and best practices. Badges from these services can summarize quality and be displayed on GitHub and CPAN pages. An open source dashboard project shows how to display these metrics for multiple modules. The goal is to quantify improvements by regularly measuring proxies over time.
The document describes how the author created a Twitter bot called @apollo11at50 that tweets the Apollo 11 mission timeline in real time to celebrate the 50th anniversary of the mission. It details how the author scraped NASA's timeline data, used Ruby and Twitter's API to code the bot, sourced NASA photos, and deployed the bot to tweet the remaining events, encouraging people to follow @apollo11at50 to see the concluding tweets.
Monoliths, Balls of Mud and Silver BulletsDave Cross
This document discusses monolithic architectures and microservices. It notes that while microservices are an improvement over monoliths and "balls of mud", they are not a "silver bullet" and care must be taken to realize their benefits. Specifically, having microservices share a monolithic database can cause issues around ownership and changing the database schema. The document provides some tips for implementing microservices including making services RESTful, assuming private APIs will become public, and emulating Johnny Cash by destroying monoliths "One Piece at a Time".
A (not entirely serious) talk that I gave at the London Perl Mongers technical meeting in March 2018.
It talks about how and why I build a web site listing the line of succession to the British throne back through history.
Web Site Tune-Up - Improve Your GooglejuiceDave Cross
This document summarizes a workshop on improving a website's visibility in Google search results. It covers topics like using semantic HTML and meaningful URLs, adding structured data and metadata tags, creating XML sitemaps, and ensuring security with HTTPS. The workshop teaches techniques for making a site understandable to Google's algorithms in order to increase visitor traffic from search engines.
Modern Perl web development has evolved over the past 20 years. While Perl was once widely used for web development via CGI scripts, newer technologies emerged that were easier to maintain. The document discusses how Perl is still suitable for web development using modern tools like PSGI, Plack, Dancer2, and others. It demonstrates building a basic TODO application in Perl using these tools, including generating database classes from an existing database, retrieving and displaying data, and adding features with JavaScript and jQuery.
The document discusses using the Lingua::EN::Inflexion module in Perl to easily inflect words based on number, part of speech, and other grammatical properties. It introduces the inflect() function, which can take a template containing tags like <N:error> and inflect the words correctly based on the number provided, such as producing the correct singular or plural form of nouns. Examples show how this allows generating grammatically correct error messages in a simple way compared to alternative approaches. It further demonstrates additional features like handling different numbers for one error and producing alternative wordings.
The document discusses improving the Dev Assistant project, an AI assistant tool, by reducing its use of PERL code and making it more accessible to non-expert Perl programmers. It encourages readers to contribute by forking the project's Github repository, making code changes, and submitting pull requests to help the project team modernize the codebase and provide a better first impression of the Perl language.
This document discusses conference driven publishing, where a talk is proposed and given before the associated work is completed. It focuses on the speaker's experience with this process for publishing an unfinished Perl book. While tools like Markdown, Pandoc, Kindlegen and Calibre helped automate conversion to ebook formats, the speaker admits to procrastinating on writing the actual book content. The document encourages others not to procrastinate and to write and self-publish books for Perl that may no longer interest traditional publishers.
The document discusses conference driven publishing and the author's procrastination in writing a book. It proposes a process of proposing an unwritten talk, having other interesting but unproductive experiences, and finally giving a talk about what should have happened. It encourages writing books using Markdown, Pandoc and free publishing platforms like Amazon, and provides examples like the Plack Handbook to demonstrate it is possible on any topic or size. The author promises another update in Granada and signs off, encouraging the audience not to procrastinate and to write a book themselves.
This document provides an agenda and overview for a workshop on using Perl for Internet of Things applications. The workshop will cover using Perl and HTTP for device communication, creating web clients and APIs with HTTP::Tiny and Dancer, and developing REST APIs in Perl. Attendees will learn how any language can be used for IoT by treating devices as HTTP clients that trigger actions by making requests to server responses. Practical examples will include reading sensor data and communicating with Arduino devices from Perl programs.
The document announces that the author has written a book called "Perl Web Book" to address the misinformation around modern web development techniques in Perl. It aims to cover topics like PSGI/Plack, Web::Simple, Mojolicious, Dancer and Catalyst. The book will be freely available online and through Amazon. The author hopes to have it completed in time for the next London Perl Workshop and seeks help, advice, suggestions and reviewers for the project.
The document discusses how GitHub, Travis-CI, and APIs work together to enable continuous integration and make software development more collaborative. GitHub allows for social coding and free hosting of projects. Travis-CI monitors GitHub projects for commits and runs unit tests to report on success or failure. APIs allow additional features to be integrated and allow an ecosystem of tools to be built. The combination of these services enables easy continuous integration of Perl projects.
The document discusses that most Perl programmers are not elite or advanced users who attend conferences or follow the latest news and trends. It notes that these less experienced programmers "don't know what they don't know" and provides examples of common misconceptions around topics like time zones and Perl syntax. The author suggests creating a Perl Community Outreach Team to help address knowledge gaps and improve documentation by engaging with less experienced programmers respectfully. This could help both the individual programmers and strengthen the Perl community overall.
The document discusses rewriting Matt's Script Archive using modern Perl best practices like PSGI and common frameworks like Dancer, Catalyst, and Mojolicious. It provides some history on Matt's original scripts from 1995 and 2001 and mentions rewriting them again to address issues like security holes, lack of modules, and not following best practices. The rewrite will be hosted on GitHub and aim to provide simple examples and solutions to common problems.
The document summarizes recent Perl releases including 5.10, 5.12, and 5.14. Some key features introduced include defined-or operator, switch statement, smart matching, say() function, lexical $_, state variables, and non-destructive substitution. Perl aims to have major releases each year with new features, modules, and enhancements while maintaining backwards compatibility when possible.
Dave Cross runs Perl training courses that he has been providing since 2001, sometimes alongside conferences. The courses include internal training for companies as well as public courses. A free one-day advanced Perl training course sponsored by BBC Backstage in 2007 was fully booked within days and received very positive feedback. However, publicly advertised paid Perl training courses in London in 2008 were cancelled due to lack of interest, demonstrating the importance of good marketing. Subsequent training courses run in partnership with UKUUG and O'Reilly in 2009 that were better marketed nearly sold out. Various conclusions are drawn that people remain interested in Perl training at different levels, and that marketing is important but challenging.
The document proposes that instead of marketing Perl to gain more programmers, the community should become more exclusive like a secret society called the Perl Masons. It suggests the community have secret monthly meetings where arcane Perl knowledge is passed on, obscure websites, and increased coolness by being underground and exclusive with a secret handshake. The document argues this would be better than mainstream popularity and gaining more programmers, both good and bad.
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, presentation slides, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025BookNet Canada
Book industry standards are evolving rapidly. In the first part of this session, we’ll share an overview of key developments from 2024 and the early months of 2025. Then, BookNet’s resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about what’s next.
Link to recording, transcript, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nächste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden “automatisch” im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, während sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewährleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung häufiger Probleme in HCL Nomad Web untersuchen, einschließlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- Verständnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
2. London Perl Workshop 2016
Modern Perl Catch-Up
●
New things in Perl that you might have missed
●
Haven't we done this before?
●
"Modern Core Perl" December 2011
●
This is a sequel
3. London Perl Workshop 2016
Perl Releases
●
Perl is released annually
●
In the spring
●
Even-numbered versions are production releases
– 5.22, 5.24, 5.26
●
Odd-numbered versions are development releases
– 5.21, 5.23, 5.25
●
5.25 will become 5.26
4. London Perl Workshop 2016
Perl Support
●
Perl releases are officially supported for two
years
● perldoc perlpolicy
●
Currently 5.22 and 5.24
●
Limited support for older versions
●
Longer support from vendors
5. London Perl Workshop 2016
Update Your Perl
●
Using the system Perl is a bad idea
●
Often out of date
● perlbrew and plenv
7. London Perl Workshop 2016
5.16
●
5.16.0 - 20 May 2012
●
5.16.1 - 08 Aug 2012
●
5.16.2 - 01 Nov 2012
●
5.16.3 - 11 Mar 2013
8. London Perl Workshop 2016
5.16 Features
● __SUB__
●
Fold case
●
Devel::DProf removed
●
perlexperiment
●
perlootut
●
Old OO docs removed
●
Unicode 6.1
9. London Perl Workshop 2016
__SUB__
●
New special source code token
● Like __PACKAGE__, __FILE__ and __LINE__
●
Returns a reference to the current subroutine
●
Easier to write recursive subroutines
10. London Perl Workshop 2016
Recursive without __SUB__
sub fib {
my ($n) = @_;
return 1 if $n <= 2;
return fib($n - 1) + fib($n - 2);
}
11. London Perl Workshop 2016
Recursive with __SUB__
sub fib {
my ($n) = @_;
return 1 if $n <= 2;
return __SUB__->($n - 1) +
__SUB__->($n - 2);
}
12. London Perl Workshop 2016
Recursive with __SUB__
sub fib {
my ($n) = @_;
return 1 if $n <= 2;
return __SUB__->($n - 1) +
__SUB__->($n - 2);
}
13. London Perl Workshop 2016
Fold Case
● lc($this) eq lc($that)
●
Unicode complicates everything
●
Lower-case comparisons can fail
●
As can upper-case comparisons
●
"Fold-case" is guaranteed to work
● fc($this) eq fc($that)
● Also F (like L and U)
14. London Perl Workshop 2016
Devel::DProf Removed
●
Devel::DProf was an old profiling tool
●
Few people know how to use it
●
We're better off without it
●
Devel::NYTProf is much better
15. London Perl Workshop 2016
perldoc perlexperiment
●
New documentation page
●
Lists the experiments in the current version of
Perl
– Vital to use the right version
● Compare perldoc experimental
16. London Perl Workshop 2016
perldoc perlootut
●
New OO tutorial
●
Improvement on old version
●
Up to date
●
Covers OO frameworks
– Moose, Moo, Class::Accessor, Class::Tiny, Role::Tiny
●
So consider those the "approved" list of OO
frameworks
17. London Perl Workshop 2016
Old OO docs removed
●
Outdated OO documentation removed
●
perlboot (basic OO tutorial)
●
perltoot (Tom's OO tutorial)
●
perlbot (bag of object tricks)
●
perlootut replaces all of these
18. London Perl Workshop 2016
Unicode 6.1
●
Unicode complicates everything!
●
http://www.unicode.org/versions/Unicode6.1.0
●
"This latest version adds characters to support
additional languages of China, other Asian
countries, and Africa. It also addresses
educational needs in the Arabic-speaking world.
A total of 732 new characters have been added."
20. London Perl Workshop 2016
5.18
●
5.18.0 - 18 May 2013
●
5.18.1 - 12 Aug 2013
●
5.18.2 - 06 Jan 2013
●
5.18.3 - 01 Oct 2014
●
5.18.4 - 01 Oct 2014
21. London Perl Workshop 2016
5.18 Features
● no warnings experimental::foo
●
Hash rework
●
Lexical subroutines
●
Smartmatch is experimental
● Lexical $_ is experimental
● $/ = $n reads $n characters (not bytes)
● qw(...) needs extra parentheses
●
Unicode 6.2
22. London Perl Workshop 2016
no warnings experimental::foo
●
New "warnings" category - experimental
●
Warns if you use experimental features
● no warnings experimental::foo
●
"Don't warn me that I'm using experimental
feature 'foo'"
●
"I know what I'm doing here!"
23. London Perl Workshop 2016
Hash Rework
●
Big change in the way hashes are implemented
●
Hash ordering is even more random
●
Random seed in hashing algorithm
● keys (and values, etc) returns different order
each run
●
Algorithmic complexity attacks
24. London Perl Workshop 2016
Example
$ perl -E'%h=(one=>1,two=>2,three=>3); say keys %h'
onethreetwo
$ perl -E'%h=(one=>1,two=>2,three=>3); say keys %h'
threetwoone
$ perl -E'%h=(one=>1,two=>2,three=>3); say keys %h'
threetwoone
$ perl -E'%h=(one=>1,two=>2,three=>3); say keys %h'
threeonetwo
25. London Perl Workshop 2016
Previously
●
With earlier versions, the same hash would
return the keys in the same order each time
●
Now you can't rely on that
●
Exposes weaknesses in tests
●
Careful testing required!
26. London Perl Workshop 2016
Lexical Subroutines
●
Experimental feature
● no warnings
experimental::lexical_subs
●
Truly private subroutines
●
Only visible within your lexical scope
● state sub foo { ... }
● my sub bar { ... }
27. London Perl Workshop 2016
state vs my
●
Similar to variable declarations
● my subroutines are recreated each time their scope is
executed
● state subroutines are created once
● state subroutines are slightly faster
● my subroutines are required for closures
● Also our for access to a global subroutine of the same
name
28. London Perl Workshop 2016
Private Subroutines
● We name private subroutines with leading _
● sub _dont_run_this { ... }
●
"Please don't run this"
●
We can now enforce this
● state sub _cant_run_this { ... }
●
Only visible within current lexical scope
29. London Perl Workshop 2016
Smartmatch is Experimental
●
Smartmatch is confusing
●
Smartmatch has changed a few times
●
Smartmatch should probably be avoided
●
Smartmatch is experimental
● no warnings
experimental::smartmatch
● Warns on ~~, given and when
30. London Perl Workshop 2016
Smartmatch
“Smart match, added in v5.10.0 and significantly revised
in v5.10.1, has been a regular point of complaint.
Although there are a number of ways in which it is
useful, it has also proven problematic and confusing for
both users and implementors of Perl. There have been a
number of proposals on how to best address the
problem. It is clear that smartmatch is almost certainly
either going to change or go away in the future. Relying
on its current behavior is not recommended.”
31. London Perl Workshop 2016
Lexical $_ is Experimental
●
Introduced in 5.10
●
"it has caused much confusion with no obvious
solution"
● no warnings
experimental::lexical_topic
●
Spoilers: Removed in 5.24
32. London Perl Workshop 2016
$/ = $n Reads $n Characters
● Setting $/ to a reference to an integer
●
(Previously) Reads that number of bytes
●
(Now) Reads that number of characters
●
This is almost certainly what you want
●
Unicode complicates everything
33. London Perl Workshop 2016
qw(...) Needs Extra Parentheses
●
Correcting a parsing bug
● foreach qw(foo bar baz) { ... }
●
Perl previously added the missing parentheses
●
Now it doesn't
● foreach (qw(foo bar baz)) { ... }
34. London Perl Workshop 2016
Unicode 6.2
●
Unicode complicates everything!
●
http://www.unicode.org/versions/Unicode6.2.0
●
"Version 6.2 of the Unicode Standard is a special
release dedicated to the early publication of the
newly encoded Turkish lira sign."
36. London Perl Workshop 2016
5.20
●
5.20.0 - 27 May 2014
●
5.20.1 - 14 Sep 2014
●
5.20.2 - 14 Feb 2015
●
5.20.3 - 12 Sep 2015
37. London Perl Workshop 2016
5.20 Features
●
Subroutine signatures (experimental)
● %hash{...} and %array[...] slices
●
Postfix dereferencing (experimental)
●
Unicode 6.3
38. London Perl Workshop 2016
Subroutine Signatures
●
Subroutines can now have a signature
● sub foo ($bar, $baz) { ... }
● use feature 'signatures'
●
Experimental
● no warnings
experimental::signatures
39. London Perl Workshop 2016
Mandatory Parameters
● sub foo ($bar, $baz) { ... }
●
Checks the number of parameters
●
Throws exception if the wrong number
● Assigns parameters to $bar and $baz
40. London Perl Workshop 2016
Unnamed Parameter
●
Parameters can be unnamed
● Use $ without a name
● sub foo ($bar, $, $baz) { ... }
●
Must pass three parameters
●
Second parameter is not assigned to a variable
● All parameters still in @_
41. London Perl Workshop 2016
Optional Parameters
●
Make parameters optional by giving them a
default
● sub foo ($bar, $baz = 0) { ... }
●
Call with one or two parameters
● $baz set to 0 by default
42. London Perl Workshop 2016
Slurpy Parameters
●
'Slurpy' parameters follow postional parameters
●
Assign them to an array
● sub foo ($bar, @baz) { ... }
● foo('a', 'b', 'c');
●
Or a hash
● sub foo ($bar, %baz) { ... }
● foo('a', 'b', 'c');
● foo('a', b => 'c');
43. London Perl Workshop 2016
%hash{...} and %array[...]
Slices
●
Old array slices
● @slice = @array[1, 3..5]
●
Returns four elements from the array
●
Also with hashes
● @slice = @hash{'foo', 'bar', 'baz'}
●
Returns three values from the hash
44. London Perl Workshop 2016
New Hash Slices
● New %h{...} slice syntax
● %subhash =
%hash{'foo', 'bar', 'baz'}
●
Returns three key/value pairs
●
Also with arrays
● @slice = %array[1, 3..5]
●
Returns four index/element pairs
45. London Perl Workshop 2016
Postfix Dereferencing
● no warnings experimental::postderef
●
New syntax for dereferencing
●
Follows left-to-right rules throughout
46. London Perl Workshop 2016
Postfix vs Prefix
● $sref->$*; # same as ${ $sref }
● $aref->@*; # same as @{ $aref }
● $href->%*; # same as %{ $href }
● $cref->&*; # same as &{ $cref }
● $gref->**; # same as *{ $gref }
47. London Perl Workshop 2016
Left to Right Throughout
●
Old style
● @arr = @{$r->{foo}[0]{bar}}
●
New style
● @arr = $r->{foo}[0]{bar}->@*
48. London Perl Workshop 2016
Unicode 6.3
●
Unicode complicates everything!
●
http://www.unicode.org/versions/Unicode6.3.0
●
"Version 6.3 of the Unicode Standard is a special
release focused on delivering significantly
improved bidirectional behavior."
50. London Perl Workshop 2016
5.22
●
5.22.0 - 01 Jun 2015
●
5.22.1 - 13 Dec 2015
●
5.22.2 - 29 Apr 2016
51. London Perl Workshop 2016
5.22 Features
●
New bitwise operators
●
Double diamond operator
● New regex boundaries b{...}
● New /n option on regexes
●
Unicode 7.0
● Omitting % and & on hash and array names now
an error
52. London Perl Workshop 2016
5.22 Features (cont)
● defined(@array) and defined(%hash) now
fatal error
● %hash->{$key} and @array->[$idx] now fatal
errors
●
perlunicook
●
find2perl, a2p, s2p removed
●
CGI removed
●
Module::Build removed
53. London Perl Workshop 2016
New Bitwise Operators
●
Old bitwise operators
● ~, &, |, ^
●
Expect numbers as operands
●
"Work" on strings too
●
No numeric/string differentiation
54. London Perl Workshop 2016
New Bitwise Operators
● use feature 'bitwise';
● no warnings
'experimental::bitwise';
● Or use experimental 'bitwise';
●
Old operators are always numeric
●
New string bitwise operators
● ~., &., |., ^.
55. London Perl Workshop 2016
Double Diamond Operator
● <<>>
● Like <>
● Uses three-arg open()
● All elements of @ARGV treated as filenames
● |foo will no longer work
56. London Perl Workshop 2016
New Regex Boundaries
● Extensions to b
● b{wb} - Word boundary
– Like b but cleverer about punctuation within words
● b{sb} - Sentence boundary
● b{gcb} - Grapheme cluster boundary
– Unicode complicates everything!
57. London Perl Workshop 2016
/n Option on Regexes
● New option for m/.../ and s/.../.../
●
Turns off call capturing
● /(w+)/ - fills in $1
● /(w+)/n - doesn't
● See also (?:w+)
58. London Perl Workshop 2016
Unicode 7.0
●
Unicode complicates everything!
●
http://www.unicode.org/versions/Unicode7.0.0
●
"Unicode 7.0 adds a total of 2,834 characters,
encompassing 23 new scripts and many new
symbols, as well as character additions to many
existing scripts"
59. London Perl Workshop 2016
Unicode 7.0
●
Two newly adopted currency symbols: the manat, used in
Azerbaijan, and the ruble, used in Russia and other countries
●
Pictographic symbols (including many emoji), geometric
symbols, arrows, and ornaments originating from the
Wingdings and Webdings sets
●
Twenty-three new lesser-used and historic scripts extending
support for written languages of North America, China, India,
other Asian countries, and Africa
●
Letters used in Teuthonista and other transcriptional systems,
and a new notational set, Duployan
60. London Perl Workshop 2016
Omitting % and @ on Hash and Array
Names
●
You used to be able to omit sigils in some
circumstances
●
Very stupid thing to do
●
Deprecation warning since 5.000 (1994!)
●
Now a fatal error
61. London Perl Workshop 2016
defined(@array) and
defined(%hash) now Fatal Errors
●
Another parser bug fixed
●
Deprecated since 5.6.1
●
Deprecation warning since 5.16
●
Now a fatal error
62. London Perl Workshop 2016
%hash->{$key} and @array-
>[$idx] now Fatal Errors
●
Bet you didn't know you could do that
●
Now you can't
●
Deprecated since "before 5.8"
●
Now a fatal error
63. London Perl Workshop 2016
perlunicook
●
New cookbook of Unicode recipes
●
By Tom Christiansen
●
Well worth reading
●
If you think you don't care about Unicode,
you're wrong
●
Unicode complicates everything
64. London Perl Workshop 2016
find2perl, a2p, s2p Removed
●
Old programs that converted from standard
Unix utilities
●
No-one had used them for years
●
No-one had maintained them for years
●
No-one cares they're gone
65. London Perl Workshop 2016
CGI Removed
●
Contentious
●
CGI is a terrible way to write web applications
●
Including CGI.pm with Perl was seen as an
endorsement
●
Best to remove it
●
Use PSGI/Plack instead
66. London Perl Workshop 2016
Module::Build Removed
●
Written as a replacement for
ExtUtils::MakeMaker
●
Pure Perl
● Didn't use make
●
Cross-platform
●
Failed experiment
69. London Perl Workshop 2016
5.24 Features
●
Postfix dereferencing no longer experimental
●
Unicode 8.0
● b{lb}
●
Shebang redirects to Perl6
●
autoderef removed
70. London Perl Workshop 2016
Postfix Dereferecing
●
Added in 5.20
●
No longer experimental
71. London Perl Workshop 2016
Unicode 8.0
●
Unicode complicates everything!
●
http://www.unicode.org/versions/Unicode8.0.0
●
"Unicode 8.0 adds a total of 7,716 characters,
encompassing six new scripts and many new
symbols, as well as character additions to
several existing scripts."
72. London Perl Workshop 2016
Unicode 8.0
●
A set of lowercase Cherokee syllables, forming case pairs with the
existing Cherokee characters
●
A large collection of CJK unified ideographs
●
Emoji symbols and symbol modifiers for implementing skin tone
diversity
●
Georgian lari currency symbol
●
Letters to support the Ik language in Uganda, Kulango in the Côte
d’Ivoire, and other languages of Africa
●
The Ahom script for support of the Tai Ahom language in India
●
Arabic letters to support Arwi—the Tamil language written in the Arabic
script
73. London Perl Workshop 2016
b{lb}
●
New regex boundary
●
Matches a (potential) lib break
●
Place where you could break a line
●
Unicode property
●
See also Unicode::Linebreak
74. London Perl Workshop 2016
Shebang Redirects to Perl 6
●
Perl will start another program given in the
shebang
● E.g. #!/usr/bin/ruby
●
Only if the path doesn't contain "perl"
●
Now works for "perl6" too
75. London Perl Workshop 2016
Auto-deref Removed
●
Added in 5.14
●
Array and hash functions work on references
● push @$arr_ref vs push $arr_ref
● keys %$hash_ref vs keys %$hash_ref
●
"Deemed unsuccessful"
80. London Perl Workshop 2016
Staying Up To Date
●
How do you know a new version of Perl has
been released?
●
How do you know what is in a new release of
Perl?
81. London Perl Workshop 2016
Keep Up To Date With Perl News
●
@perlfoundation
●
Reddit
●
Perl Weekly
82. London Perl Workshop 2016
@perlfoundation
●
The Perl Foundation Twitter account
●
~7,000 followers
●
Run by volunteers
●
Tries to be first with Perl news
83. London Perl Workshop 2016
Reddit
●
Perl subreddit
●
http://reddit.com/r/perl
●
Links to interesting Perl articles/announcements
●
Also help students with their Perl homework
84. London Perl Workshop 2016
Perl Weekly
●
Weekly Perl email
●
Links to interesting Perl articles/announcements
●
Curated by humans
●
Web feed
●
Highly recommended
85. London Perl Workshop 2016
What Is In The New Release?
● Read the perldelta man page
●
Included with every Perl release
●
Older versions available too
87. London Perl Workshop 2016
Conclusion
●
Perl has an annual release cycle
●
Interesting/useful changes in each release
●
Worth keeping up to date
●
A reason to upgrade?