SlideShare a Scribd company logo
Modern Web
Development in Perl
Jason A. Crome
https://crome-plated.com
March 14, 2017 Copyright (C) 2017, Jason A. Crome
What is Perl?
Common Misconceptions
• It’s dead
• It’s dying
• It’s just for sysadmins
• It’s not for real development
• It’s not modern - hasn’t been updated in years
Why the Misconceptions?
• Bad Marketing
• Perl 6
• Matt’s Script Archive
Perl 6
• Sister language to Perl 5, not a successor!
• Poorly marketed as such
• Fantastic language!
• Both functional and procedural
• Thread-safe
Strengths
• Data Munging
• Bioinformatics
• Devops
• Web application development
• MMOs
• Whipuptitude
Weaknesses
• Threading
• Device Drivers
• 3D game development
• Learning curve
Who’s Using Perl?
• ZipRecruiter
• Booking.com
• Craigslist
• Ticketmaster
• Amazon
• BBC
• NASA
• Rent.com
• DuckDuckGo
• IMDB
• CrowdTilt
• ShutterStock
• ServerCentral
• Bank of America
Modern Web Development in Perl
Actively Developed
• 24th version of Perl 5
• 26th version to be released ~June
• One major release every year
• 5.26 will be 8th production release in last 7 years
• Does that seem like a dead language to you?!
What is Modern Perl?
• First-class OO programming
• Great Testing Infrastructure
• Deployment and Configuration Toolchain
• Active user community
• Modern language features
• Modern frameworks
Object Oriented
• Moose
• Moo
• (before that) Overloaded hashes
package Point;
use Moose;
has 'x' => (isa => 'Int', is => 'rw', required => 1);
has 'y' => (isa => 'Int', is => 'rw', required => 1);
sub clear {
my $self = shift;
$self->x(0);
$self->y(0);
}
package Point3D;
use Moose;
extends 'Point';
has 'z' => (isa => 'Int', is => 'rw', required => 1);
after 'clear' => sub {
my $self = shift;
$self->z(0);
};
# hash or hashrefs are ok for the constructor
my $point1 = Point->new(x => 5, y => 7);
my $point2 = Point->new({x => 5, y => 7});
my $point3d = Point3D->new(x => 5, y => 42, z => -5);
Using the Point Class
Roles with Moose
package MyApp::CLI::SetPassword;
use strictures 2;
use MooseX::App::Command;
extends qw( MyApp::CLI );
with qw(
MyApp::Role::CLI::WithPassword
MyApp::Role::CLI::WithUsername
MyApp::Role::CLI::WithUser
);
use MyApp::Module;
sub run ( $self ) {
$self->_say( "Changing password for " . $self->username . '...' );
$self->user->password( $self->password );
$self->user->update;
say "Done!";
}
1;
Testing Infrastructure
• Test2
• Test::Class::Moose
• prove
• Test::Harness
• TAP
Deployment/Configuration
• Plack
• cpanfile
• Carton
• perlbrew
• plenv
Community
• Perl’s greatest strength
• Perl Mongers
• YAPC / TPC
• (Meta)CPAN
MetaCPAN
Modern Language Features/
Tools
• Named Parameters
• XS
• POD
• Perlcritic
• Perltidy
Named Parameters
sub clear( $self ) {
$self->x(0);
$self->y(0);
}
after 'clear' => sub( $self ) {
$self->z(0);
};
sub set( $self, $x, $y, $z) {
$self->x( $x );
$self->y( $y );
$self->z( $z );
}
Modern Frameworks
• ORMs
• Templating Frameworks
• Web App Frameworks
ORMs
• DBI
• Class::DBI
• DBIx::Class
• Rose::DB
DBIx::Class
$user = $schema->resultset('User')->find( { email => $self->email } );
$user = $schema->resultset('User')->create(
{ username => $self->username,
password => $self->password,
email => $self->email,
}
);


my $user_rs = $schema->resultset('User')->search({
email => { like => '%example.com' },
},{
order_by => { username => 'ASC' },
}
);
Templating Frameworks
• HTML::Template
• Mason
• Template Toolkit
• And many, many others…
Web App Frameworks
And now, Dancer2!
Questions?
Thanks!
https://crome-plated.com
jason@crome-plated.com
Sample Code: https://github.com/cromedome/RWD
Slides: https://www.slideshare.net/cromedome/modern-web-
development-in-perl
Bonus 1: Point Class,
Old World Perl
package Point;
sub new {
my ($class, $x, $y) = @_;
my $self = {
x => $x,
y => $y,
};
return bless $self, $class;
}
sub get_x {
return $_[0]->{x};
}
sub set_x {
return $_[0]->{x} = $_[1];
}
sub get_y {
return $_[0]->{y};
}
sub set_y {
return $_[0]->{y} = $_[1];
}
1;

More Related Content

PDF
Perl Development Environment Tooling
PPTX
Workshop 3: Create a Killer Online Bio: Promote Your Design Stardom - Fred Berns
PPTX
PDF
How Accessibility Made Me a Better Developer
PPSX
Lo que no suele discutirse en el debate sobre las humanidades y la educación ...
PPT
Physical science demonstration lesson on nature of matter
PPTX
Art ellipse-portraits
PPTX
Sediments transport
Perl Development Environment Tooling
Workshop 3: Create a Killer Online Bio: Promote Your Design Stardom - Fred Berns
How Accessibility Made Me a Better Developer
Lo que no suele discutirse en el debate sobre las humanidades y la educación ...
Physical science demonstration lesson on nature of matter
Art ellipse-portraits
Sediments transport

Viewers also liked (14)

PDF
Set reforzamiento aula 360 2
PPTX
Sediments loads
PPT
Micro teaching
DOCX
Classement général après journée24 11 12mars
PPTX
How to search the Internet, a guide to save time and effort
PPTX
When worlds Collide: HTML5 Meets the Cloud
PDF
How to develop modern web application framework
PPTX
Google webmaster guide for starters
PPT
Calculate your Water Footprint at H2O Conserve
PPT
Bad websites
PDF
The Modern Web, Part 2: HTML5
PPTX
Affordable web design
PDF
The Modern Web Part 3: Social Networking
PPTX
Internet Search
Set reforzamiento aula 360 2
Sediments loads
Micro teaching
Classement général après journée24 11 12mars
How to search the Internet, a guide to save time and effort
When worlds Collide: HTML5 Meets the Cloud
How to develop modern web application framework
Google webmaster guide for starters
Calculate your Water Footprint at H2O Conserve
Bad websites
The Modern Web, Part 2: HTML5
Affordable web design
The Modern Web Part 3: Social Networking
Internet Search
Ad

Similar to Modern Web Development in Perl (20)

PDF
Deploying Machine Learning Models to Production
PDF
Building Atlassian Plugins with Groovy - Atlassian Summit 2010 - Lightning Talks
PDF
React Native Evening
PDF
Retaining globally distributed high availability
PDF
ES2015のカバレッジ計測
PPTX
Perl basics for pentesters part 2
PDF
Intro to React
PDF
Charla EHU Noviembre 2014 - Desarrollo Web
PPTX
Vulnerabilities of machine learning infrastructure
KEY
Ein Stall voller Trüffelschweine - (PHP-)Profiling-Tools im Überblick
PDF
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
PDF
Perl6 meets JVM
PDF
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
PDF
2009-02 Oops!
PDF
Hack the Future
PPTX
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
PDF
frontend college edulink kenia
PDF
DDD on example of Symfony (SfCampUA14)
PDF
Our Puppet Story (GUUG FFG 2015)
PDF
Functional Programming in Clojure
Deploying Machine Learning Models to Production
Building Atlassian Plugins with Groovy - Atlassian Summit 2010 - Lightning Talks
React Native Evening
Retaining globally distributed high availability
ES2015のカバレッジ計測
Perl basics for pentesters part 2
Intro to React
Charla EHU Noviembre 2014 - Desarrollo Web
Vulnerabilities of machine learning infrastructure
Ein Stall voller Trüffelschweine - (PHP-)Profiling-Tools im Überblick
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Perl6 meets JVM
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
2009-02 Oops!
Hack the Future
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
frontend college edulink kenia
DDD on example of Symfony (SfCampUA14)
Our Puppet Story (GUUG FFG 2015)
Functional Programming in Clojure
Ad

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
AI in Product Development-omnex systems
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
top salesforce developer skills in 2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Softaken Excel to vCard Converter Software.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Which alternative to Crystal Reports is best for small or large businesses.pdf
AI in Product Development-omnex systems
How to Choose the Right IT Partner for Your Business in Malaysia
Upgrade and Innovation Strategies for SAP ERP Customers
Navsoft: AI-Powered Business Solutions & Custom Software Development
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Reimagine Home Health with the Power of Agentic AI​
top salesforce developer skills in 2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Understanding Forklifts - TECH EHS Solution
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
Softaken Excel to vCard Converter Software.pdf

Modern Web Development in Perl