SlideShare a Scribd company logo
Modern Perl for the
Unfrozen Paleolithic
Perl Programmer
John SJ Anderson ⭐ Infinity Interactive ⭐ @genehack
DC-Balmer Perl Workshop ⭐ 16 Apr 2016
Disclaimer
I'mma talk pretty fast. Feel free to ask questions particularly if I'm moving too quickly
I'M JUST A CAVEMAN
YOUR MODERN PERL
FRIGHTENS AND CONFUSES ME
I was inspired to give this talk by a few online friends who happen to be Perl programmers -- but they're not engaged with the community, they're just using Perl to get a
job done, and there's a widening gulf between what I think is reasonable and what they're doing -- so I wanted to put together sort of an info dump
Welcome
to 2016!
So, hi, unfrozen caveman Perl programmer! Welcome to 2016!
Quite a few
things have
changed...
Many things have changed since you fell into that glacier in 2001,
...but
many
haven't
There's a Clinton
running for
President!
Perl6 is still just about going to be released!
We're still
using Perl5!
Most of us are still happily coding in Perl5, however
2001:
Perl 5.6
When you slipped into that big hole in the ice, perl 5.6 was the latest and greatest
2016:
Perl 5.22
But we're all the way up to 5.22 now
2016:
Perl 5.22
4But we're all the way up to 5.22 now
Many 

language
improvements
Unicode
support!
You probably don't remember Unicode -- it was around in 2001, but not terribly important or very well understood. It's way too complicated to get into here, just know
that now we can get _really_ expressive in our Perl code
😀So it's much easier to tell if we're happy...
💩... or when things aren't going quite as well.
This should be a familiar way of communication for you!
defined($this)	?	$this	:	$that
defined-or
We got a great new feature in 5.10 called defined-or.

You've probably written code much like this hundreds of times.
$this	//	$that
defined-or
Now, we can just write this! 

Which is pretty awesome. Defined-or was my favorite new perl feature of the 2000s
subroutine
signatures
Finally, we've also recently gotten support for subroutine signatures
sub	add	($one,	$two)	{	
			return	$one	+	$two;	
	}
so we don't even have to unpack @_ ourselves!

Who has started using subroutine signatures?
new tools
It's not just language level features, we also have a host of new tools to make it easier to work with Perl
"system" perl:

These days, we make a distinction between the Perl that comes with your OS
"system" perl:

just say no
and encourage people not to use it for their development projects
/usr/bin/perl
Yes, that means good old /usr/bin/perl...
/usr/bin/perl
is no more. Instead, we use tools to install new Perls, outside the control of the OS
perlbrew
The first tool that was developed for this purpose is called Perlbrew
perlbrew.pl
which you can get at perlbrew.pl
plenv
there's also a newer option, plenv
https://github.com/tokuhirom/plenv
it's website isn't quite as snazzy as perlbrew's
advantages
• Solves "vendor Perl lockin" issues

• Install multiple Perls in your home directory

• ... or elsewhere

• Trivially switch from Perl version to Perl version

• Able to install modules without special permissions

• Easy to stay up to date with Perl development
either one of these tools will give you numerous advantages over using the system perl
plenv > perlbrew
• Less magic messing around with PATH 

• Can "pin" Perl different ways: globally, per-shell, or
per-directory
personally, i'm using plenv these days -- the ability to easily specify a Perl version for a particular project is particularly useful to me
perlbrew > plenv
• Kickass website
speaking of installing in
your $HOME…
local::lib
local::lib
• Install your own copies of modules

• In your $HOME (so no special permissions needed)

• Can also install per-project modules

• Integrates well with other tools
speaking of installing stuff…
cpanminus

cpanm
We've got a new CPAN client these days
%	cpan	Git::Wrapper	
CPAN:	Storable	loaded	ok	(v2.54)	
Reading	'/Users/genehack/.cpan/Metadata'	
		Database	was	generated	on	Sat,	10	Oct	2015	01:17:02	GMT	
Running	install	for	module	'Git::Wrapper'	
CPAN:	LWP::UserAgent	loaded	ok	(v6.13)	
Fetching	with	LWP:	
http://cpan.schatt.com/authors/id/G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz	
CPAN:	YAML	loaded	ok	(v1.15)	
CPAN:	Digest::SHA	loaded	ok	(v5.95)	
Fetching	with	LWP:	
http://cpan.schatt.com/authors/id/G/GE/GENEHACK/CHECKSUMS	
CPAN:	Compress::Zlib	loaded	ok	(v2.068)	
Checksum	for	/Users/genehack/.cpan/sources/authors/id/G/GE/GENEHACK/Git-
Wrapper-0.045.tar.gz	ok	
tmp-47326	for	tmp-47326:	No	such	file	or	directory	at	/opt/plenv/versions/5.23.2/lib/
perl5/5.23.2/CPAN/Distribution	
.pm	line	468.	
CPAN:	File::Temp	loaded	ok	(v0.2304)	
CPAN:	CPAN::Meta::Requirements	loaded	ok	(v2.133)	
CPAN:	Parse::CPAN::Meta	loaded	ok	(v1.4417)	
CPAN:	CPAN::Meta	loaded	ok	(v2.150005)	
CPAN:	Module::CoreList	loaded	ok	(v5.20150820)	
Configuring	G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz	with	Makefile.PL	
Locating	bin:git...	found	at	/opt/git/bin/git.	
Checking	if	your	kit	is	complete...	
Looks	good	
Generating	a	Unix-style	Makefile	
Writing	Makefile	for	Git::Wrapper	
Writing	MYMETA.yml	and	MYMETA.json	
this is the output from using the default 'cpan' client to install something.
GENEHACK/Git-Wrapper-0.045.tar.gz																																																																							
[17/1516]	
		/opt/plenv/versions/5.23.2/bin/perl5.23.2	Makefile.PL	--	OK	
Running	make	for	G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz	
cp	lib/Git/Wrapper/File/RawModification.pm	blib/lib/Git/Wrapper/File/RawModification.pm	
cp	lib/Git/Wrapper.pm	blib/lib/Git/Wrapper.pm	
cp	lib/Git/Wrapper/Statuses.pm	blib/lib/Git/Wrapper/Statuses.pm	
cp	lib/Git/Wrapper/Exception.pm	blib/lib/Git/Wrapper/Exception.pm	
cp	lib/Git/Wrapper/Log.pm	blib/lib/Git/Wrapper/Log.pm	
cp	lib/Git/Wrapper/Status.pm	blib/lib/Git/Wrapper/Status.pm	
Manifying	6	pod	documents	
		GENEHACK/Git-Wrapper-0.045.tar.gz	
		/usr/bin/make	--	OK	
Running	make	test	
PERL_DL_NONLAZY=1	"/opt/plenv/versions/5.23.2/bin/perl5.23.2"	"-MExtUtils::Command::MM"	"-
MTest::Harness"	"-e"	"und	
ef	*Test::Harness::Switches;	test_harness(0,	'blib/lib',	'blib/arch')"	t/*.t	
t/00-load.t	...............	1/6	#	Testing	Git::Wrapper	0.045	
t/00-load.t	...............	ok	
t/author-err.t	............	skipped:	these	tests	are	for	testing	by	the	author	
t/basic.t	.................	#	Testing	git	version:	2.5.2	
t/basic.t	.................	ok	
t/git_binary.t	............	ok	
t/parse_args.t	............	ok	
t/path_class.t	............	#	Testing	git	version:	2.5.2	
t/path_class.t	............	ok	
t/release-pod-coverage.t	..	skipped:	these	tests	are	for	release	candidate	testing	
t/release-pod-syntax.t	....	skipped:	these	tests	are	for	release	candidate	testing	
All	tests	successful.	
Files=8,	Tests=67,		1	wallclock	secs	(	0.04	usr		0.02	sys	+		0.39	cusr		0.31	csys	=		0.76	CPU)	
Result:	PASS	
		GENEHACK/Git-Wrapper-0.045.tar.gz
and this is more of the output...
(still not done
but I got tired
of pasting.)
%	cpanm	Git::Wrapper	
-->	Working	on	Git::Wrapper	
Fetching	http://www.cpan.org/authors/id/G/GE/GENEHACK/Git-Wrapper-0.045.tar.gz	...	OK	
Configuring	Git-Wrapper-0.045	...	OK	
Building	and	testing	Git-Wrapper-0.045	...	OK	
Successfully	installed	Git-Wrapper-0.045
this is the output from cpanm installing the same thing
speaking of stuff on CPAN…
https://metacpan.org/
we have a whole new website for interacting with CPAN
search.cpan.org
search.cpan.org is still around...
https://metacpan.org/
but metacpan integrates and visualizes a bunch of information in a really useful way
https://metacpan.org/
things like a syntax-highlighted source view, linking to home pages and code repos, showing test results, and the amount of activity in a project
https://github.com/CPAN-API/metacpan-web
it's also open source, so if you can think of a way to make it better, you can
Duck Duck Go 

we also have a new search engine here in 2016. it's cool, and it's partially written in Perl
Duck Duck Go 

!cpanm
The most useful feature, though, is ability to use 'bang searches' to restrict your search to a particular site - this is how you search metacpan
speaking of modules...
if you haven't been playing close attention (and since you were frozen, you haven't been!) there are a few new modules you may have missed
JSON::MaybeXS
anybody doing web development these days needs to interact with JSON - using JSON::MaybeXS will make sure that you have a JSON library available, picking the best
one from a number of alternatives
Moose

Moo
To get a handle on how we do OOP in Perl these days, you should look into Moose -- and then when you're ready to write some code, you'll probably be able to get
away with dropping down to Moo
CGI.pm
is
gone
I do have some bad news for you -- CGI.pm has been pulled out of core
(not really)
don't worry, you can still find it on CPAN
Plack
But the current standard for web development in Perl is Plack/PSGI. Offers a number of advantages over CGI, and is the basis for all modern Perl web frameworks
speaking of Perl websites…
we have quite a few new websites these days, which make it easier to keep up with the current state of things
http://cpanratings.perl.org/
one of the problems with cpan is there's just _so_ _much_ _stuff_ there. it can be hard to decide which one of a dozen different modules to use. cpanratings helps with
this problem
http://cpanratings.perl.org/
you can see individual reviews, which version they're reviewing, and so on.
https://metacpan.org/
MetaCPAN links to reviews as well as showing an average review score
http://cpants.cpanauthors.org/
we also have CPANTS - automated testing of some best practices around module development
http://cpants.cpanauthors.org/
here's what that looks like for a particular module. super useful if you're not sure you're doing things the "right" way
https://metacpan.org/
MetaCPAN links to CPANTS too
http://prepan.org/
We also have PrePAN, which is a place to get feedback on module ideas you haven't even written yet
speaking of staying up to
date on Perl news…
we also have some sites that make it easier to keep up to date with what's going on in the perl world
http://perlweekly.com/
there's perl weekly, which is a once a week email newsletter aggregating perl related news from all over the web
http://blogs.perl.org/users/sawyer_x/
and in a recent development, sawyer has revived the p5p weekly email summary -- excellent if you want to keep up with what's going on with perl5 development but
don't have time to follow the email list yourself
thanks!
questions?

More Related Content

PPTX
Modern Perl for the Unfrozen Paleolithic Perl Programmer
PDF
A Modest Introduction to Swift
PDF
Modern Perl for the Unfrozen Paleolithic Perl Programmer
PDF
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PDF
Php Dependency Management with Composer ZendCon 2016
KEY
Dependency Management With Pinto
PDF
Frontend Performance: Beginner to Expert to Crazy Person
PDF
Frontend Performance: De débutant à Expert à Fou Furieux
Modern Perl for the Unfrozen Paleolithic Perl Programmer
A Modest Introduction to Swift
Modern Perl for the Unfrozen Paleolithic Perl Programmer
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
Php Dependency Management with Composer ZendCon 2016
Dependency Management With Pinto
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: De débutant à Expert à Fou Furieux

What's hot (20)

PDF
Running a Plone product on Substance D
PDF
The Modern Developer Toolbox
PDF
Frontend Performance: Expert to Crazy Person
PDF
Chef Conf 2015: Package Management & Chef
PDF
Modern Web Development with Perl
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
KEY
Plack perl superglue for web frameworks and servers
PDF
21st Century CPAN Testing: CPANci
PDF
徒手打造自己的粉專客服機器人
PDF
CPANci: Continuous Integration for CPAN
PDF
Package manages and Puppet - PuppetConf 2015
PDF
Using PHP Functions! (Not those functions, Google Cloud Functions)
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
PDF
Puppet Camp LA 2/19/2015
ODP
Vagrant move over, here is Docker
ODP
Docker for Developers - PHP Detroit 2018
PDF
Zend Framework 1.8 workshop
PDF
Frontend Performance: Beginner to Expert to Crazy Person
PDF
Great Tools Heavily Used In Japan, You Don't Know.
PPTX
Zend con 2016 bdd with behat for beginners
Running a Plone product on Substance D
The Modern Developer Toolbox
Frontend Performance: Expert to Crazy Person
Chef Conf 2015: Package Management & Chef
Modern Web Development with Perl
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Plack perl superglue for web frameworks and servers
21st Century CPAN Testing: CPANci
徒手打造自己的粉專客服機器人
CPANci: Continuous Integration for CPAN
Package manages and Puppet - PuppetConf 2015
Using PHP Functions! (Not those functions, Google Cloud Functions)
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Puppet Camp LA 2/19/2015
Vagrant move over, here is Docker
Docker for Developers - PHP Detroit 2018
Zend Framework 1.8 workshop
Frontend Performance: Beginner to Expert to Crazy Person
Great Tools Heavily Used In Japan, You Don't Know.
Zend con 2016 bdd with behat for beginners
Ad

Viewers also liked (20)

PPTX
Semiologia examen fisico de los cuadrantes superiores del abdomen.
PPTX
Presentation1
PPTX
246 4-recorded
PPT
Commercial renderings
PDF
Bloggen leren is makkelijker dan je denkt
PPTX
American Rev & BNA
PDF
"YATHARTH"-1.Online newsletter
PPTX
презентація форми роботи з дітьми, які не охоплені дошкільною освітою
DOCX
ViewPlus Business Plan 1999
PDF
Groovy Vs Perl
PDF
Mapping Human-Centric Product Vision (ProductCamp Boston 2016)
PDF
Acuerdo cnsc convocatoria
PDF
13 Defining Moments In Business Leadership
PPTX
школа
PDF
Living in the Day of Judgment Tract Series #2: No More Salvation
PPTX
9 lessons for age 19
PDF
Boost tour 1.60.0
PDF
Hello, WatchKit
PDF
Resilient Supply Chains: How to Dynamically Manage Risk, Opportunity, and Bus...
 
PDF
CEO Branding: Why, When and How to Use the CEO in Corporate Communication
Semiologia examen fisico de los cuadrantes superiores del abdomen.
Presentation1
246 4-recorded
Commercial renderings
Bloggen leren is makkelijker dan je denkt
American Rev & BNA
"YATHARTH"-1.Online newsletter
презентація форми роботи з дітьми, які не охоплені дошкільною освітою
ViewPlus Business Plan 1999
Groovy Vs Perl
Mapping Human-Centric Product Vision (ProductCamp Boston 2016)
Acuerdo cnsc convocatoria
13 Defining Moments In Business Leadership
школа
Living in the Day of Judgment Tract Series #2: No More Salvation
9 lessons for age 19
Boost tour 1.60.0
Hello, WatchKit
Resilient Supply Chains: How to Dynamically Manage Risk, Opportunity, and Bus...
 
CEO Branding: Why, When and How to Use the CEO in Corporate Communication
Ad

Similar to Modern Perl for the Unfrozen Paleolithic Perl Programmer (20)

PDF
Perl 5.10
PDF
Continuing Evolution of Perl: Highlights of ActivePerl 5.14
PDF
perlbrew yapcasia 2010
PDF
PDF
PPT
2016年のPerl (Long version)
PDF
Old Dogs & New Tricks: What's New With Perl5 This Century
PDF
Perl Development Environment Tooling
PPTX
Introduction to perl
ODP
Whatsnew in-perl
PDF
Enterprise Perl
PDF
CPAN Training
PDF
Managing Perl Installations: A SysAdmin's View
KEY
Perlbrew
KEY
Le PERL est mort
PDF
Old Dogs & New Tricks: What's New with Perl5 This Century
KEY
Perlの現在と未来 2010
PDF
Perl 101
PPTX
Perl 5.10
Continuing Evolution of Perl: Highlights of ActivePerl 5.14
perlbrew yapcasia 2010
2016年のPerl (Long version)
Old Dogs & New Tricks: What's New With Perl5 This Century
Perl Development Environment Tooling
Introduction to perl
Whatsnew in-perl
Enterprise Perl
CPAN Training
Managing Perl Installations: A SysAdmin's View
Perlbrew
Le PERL est mort
Old Dogs & New Tricks: What's New with Perl5 This Century
Perlの現在と未来 2010
Perl 101

More from John Anderson (20)

PDF
#speakerlife
PDF
Introduction to Git (even for non-developers)
PDF
Logs are-magic-devfestweekend2018
PDF
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
PDF
A static site generator should be your next language learning project
PDF
Do you want to be right or do you want to WIN?
PDF
An Introduction to Git (even for non-developers)
PDF
You got chocolate in my peanut butter! .NET on Mac & Linux
PDF
A static site generator should be your next language learning project
PDF
Introduction to Git (even for non-developers!)
PDF
Introduction to Git for Non-Developers
PDF
A Modest Introduction To Swift
PDF
A static site generator should be your next language learning project
PDF
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
PDF
JSON Web Tokens Will Improve Your Life
PDF
A Modest Introduction to Swift
PDF
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
PDF
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
PDF
A Modest Introduction To Swift
PDF
Logs Are Magic! Why git workflows & commit structure should matter to you
#speakerlife
Introduction to Git (even for non-developers)
Logs are-magic-devfestweekend2018
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
A static site generator should be your next language learning project
Do you want to be right or do you want to WIN?
An Introduction to Git (even for non-developers)
You got chocolate in my peanut butter! .NET on Mac & Linux
A static site generator should be your next language learning project
Introduction to Git (even for non-developers!)
Introduction to Git for Non-Developers
A Modest Introduction To Swift
A static site generator should be your next language learning project
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
JSON Web Tokens Will Improve Your Life
A Modest Introduction to Swift
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
A Modest Introduction To Swift
Logs Are Magic! Why git workflows & commit structure should matter to you

Recently uploaded (20)

PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
Digital Literacy And Online Safety on internet
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
Funds Management Learning Material for Beg
PPT
tcp ip networks nd ip layering assotred slides
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
Triggering QUIC, presented by Geoff Huston at IETF 123
An introduction to the IFRS (ISSB) Stndards.pdf
Job_Card_System_Styled_lorem_ipsum_.pptx
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Module 1 - Cyber Law and Ethics 101.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Digital Literacy And Online Safety on internet
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Paper PDF World Game (s) Great Redesign.pdf
SASE Traffic Flow - ZTNA Connector-1.pdf
Unit-1 introduction to cyber security discuss about how to secure a system
Funds Management Learning Material for Beg
tcp ip networks nd ip layering assotred slides
522797556-Unit-2-Temperature-measurement-1-1.pptx
international classification of diseases ICD-10 review PPT.pptx
RPKI Status Update, presented by Makito Lay at IDNOG 10
QR Codes Qr codecodecodecodecocodedecodecode

Modern Perl for the Unfrozen Paleolithic Perl Programmer