Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Charlotte Perl Mongers Kickoff
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jason A. Crome
January 10, 2019
Programming
0
28
Charlotte Perl Mongers Kickoff
The restart of Charlotte Perl Mongers, with a graceful introduction to Modern Perl programming.
Jason A. Crome
January 10, 2019
Tweet
Share
More Decks by Jason A. Crome
See All by Jason A. Crome
Constructing Command Line Applications in Perl
cromedome
0
92
Accessibility in Web Sites
cromedome
0
23
Building a Honeypot
cromedome
0
54
Dependency Management with Carton
cromedome
0
39
Scraping Tumblr
cromedome
0
54
wEdge for Treasurers (and everyone else, too!)
cromedome
0
38
Integration Points for Property Tax, CAMA, & GIS
cromedome
0
280
Other Decks in Programming
See All in Programming
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
410
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
3
1k
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
250
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
990
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
380
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
SourceGeneratorのマーカー属性問題について
htkym
0
200
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
For a Future-Friendly Web
brad_frost
183
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
52k
New Earth Scene 8
popppiees
1
1.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Why Our Code Smells
bkeepers
PRO
340
58k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Transcript
Welcome to Charlotte Perl Mongers! Jason A. Crome Senior Perl
Developer, Empowered January 10, 2019 Copyright (C) 2019, Jason A. Crome
Who are we?
What is Perl Mongers? • Grassroots organization for promoting Perl
• Run by volunteers (and zealots like me!) • Share and disseminate information about Perl and the community • Welcome to Charlotte.pm!
Engage with us! • Us = all of you! •
Use our Meetup • charlottedevs.slack.com#perl • irc.perl.org#charlotte.pm
What is Modern Perl?
What is Modern Perl? • First-class OO programming • Great
Testing Infrastructure • Deployment and Configuration Toolchain • Active user community • Modern language features • Modern frameworks
Who’s Using Modern Perl? • ZipRecruiter • Booking.com • Craigslist
• Ticketmaster • Amazon • BBC • NASA • Rent.com • DuckDuckGo • IMDB • Empowered • ShutterStock • ServerCentral • Pinboard
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 • Mouse
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;
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 • TAP
Deployment/Configuration • Plack/PSGI • cpanfile • Carton • Pinto •
perlbrew • plenv
Community • Perl’s greatest strength • Perl Mongers • YAPC
/ TPC • (Meta)CPAN
MetaCPAN
Modern Language Features/Tools • Named parameters/sub signatures • Meta-object protocol
• XS • Pod • Perlcritic • Perltidy
Named params/sub signatures 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 ) if $z; }
Modern Frameworks • Object Frameworks • ORMs • Templating Frameworks
• Web App Frameworks
ORMs • 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 •
Mustache • XSlate • And many, many others…
Web App Frameworks
And now, live coding and swag!
Questions?
Thanks! https://empowered.net jcrome@empoweredbenefits.com Twitter: @cromedome