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
Carton CPAN dependency manager
Search
Tatsuhiko Miyagawa
October 14, 2011
Technology
4
32k
Carton CPAN dependency manager
Tatsuhiko Miyagawa
October 14, 2011
Tweet
Share
More Decks by Tatsuhiko Miyagawa
See All by Tatsuhiko Miyagawa
Carmel at YAPC::EU 2015
miyagawa
0
480
Carton at London Perl Workshop 2013
miyagawa
0
240
Managing CPAN dependencies with Carton
miyagawa
0
260
What's new in Carton and cpanm at YAPC::Asia 2013
miyagawa
6
1.2k
Carton 1.0 at OSCON 2013
miyagawa
11
2.2k
cpanm 1.6 at OSDC.TW
miyagawa
6
1.2k
10 more things to be ripped off
miyagawa
7
1.3k
Ruby; Exported
miyagawa
1
930
10 Years: LL, you and me
miyagawa
2
180
Other Decks in Technology
See All in Technology
持続可能なソフトウェア開発を支える『GitHub CI/CD実践ガイド』
tmknom
8
1.4k
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
150
なにもしてないのにNew Relicのデータ転送量が増えていたときに確認したこと
tk3fftk
2
230
タイミーのレコメンドにおける ABテストの運用
ozeshun
1
180
再考 アクターモデル/ reconsider actor model
ytake
0
360
自作Cコンパイラ 8時間の奮闘
soukouki
0
850
突撃! 隣のAmazon Bedrockユーザー 〜YouはどうしてAWSで?〜
minorun365
PRO
3
390
JTCや セキュリティチェックリストが夢の跡
nikinusu
1
710
Cloud Run と GitHub Template Repository による軽量なアプリケーションプラットフォーム/ #nikkei_tech_talk
nikkei_engineer_recruiting
0
110
Tricentisにおけるテスト自動化へのAI活用ご紹介/20240910Shunsuke Katakura
shift_evolve
0
200
言葉は感情の近似値である。その感情と言葉の誤差を最小化しよう ~コミュニケーションにおけるアナログ/デジタル変換の課題に立ち向かう~
nktamago
0
230
スタッフエンジニアの道: The Staff Engineer’s Path
snoozer05
PRO
44
14k
Featured
See All Featured
In The Pink: A Labor of Love
frogandcode
139
22k
Become a Pro
speakerdeck
PRO
22
4.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
120
The World Runs on Bad Software
bkeepers
PRO
64
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
322
23k
The Cost Of JavaScript in 2023
addyosmani
42
5.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Infographics Made Easy
chrislema
239
18k
Code Reviewing Like a Champion
maltzj
517
39k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
Transcript
Carton Tatsuhiko Miyagawa YAPC::Asia 2011 Tokyo Friday, October 14, 2011
Managing CPAN Dependencies Friday, October 14, 2011
Case Study: (Poor) Web Development Friday, October 14, 2011
You’re writing a new web app. You don’t wanna reinvent
wheels. Want to use as many CPAN deps. Friday, October 14, 2011
Fine. Get them from CPAN, install on your machine. Friday,
October 14, 2011
> cpanm Web::Framework installed LWP-‐5.912 installed Plack-‐0.9980 installed Web-‐Framework-‐1.20 >
cpanm JSON::Fast installed JSON-‐Fast-‐1.91 > cpanm MIME::Parser::XS installed MIME-‐Parser-‐XS-‐0.20 Friday, October 14, 2011
Test it... Friday, October 14, 2011
Works? Ship it! Friday, October 14, 2011
Deployment Set up new production servers. Install CPAN modules (until
the errors are gone) Friday, October 14, 2011
Few weeks later... Friday, October 14, 2011
Your website is popular! Need more web servers! Friday, October
14, 2011
Re-Deployment Set up new production servers. Install CPAN modules (until
the errors are gone) Friday, October 14, 2011
“Crap, Web::Framework has been updated to 1.4 and many APIs
have been changed or deprecated!” Friday, October 14, 2011
Rollback Log in to the old web server. Check Perl
module versions. Install them on the new server. Friday, October 14, 2011
“Crap, this author deleted the version 1.20 we want. Let’s
go to BackPAN...” Friday, October 14, 2011
“Crap, version 1.20 doesn’t actually work with the newer LWP
6 that we just installed! Have to downgrade this too...” Friday, October 14, 2011
and so on. Friday, October 14, 2011
What was wrong? Friday, October 14, 2011
• Dependency declaration • Isolated Perl environments • Version controls/history
• Dependency analysis • Repeatable deployments • etc. Friday, October 14, 2011
Many existing solutions MyCPAN, DPAN, CPAN::Mini::Inject, OrePAN, Shipwright Friday, October
14, 2011
None of those didn’t quite work for me. (Or I
haven’t even tried) Friday, October 14, 2011
So I wrote a new one. Friday, October 14, 2011
Carton https://github.com/miyagawa/carton Friday, October 14, 2011
Inspired by... Friday, October 14, 2011
Friday, October 14, 2011
• App-specific local environment • Fast and safe install •
Dep-tree analysis, including versions • Locking module versions • Easy Redeployment • Single-file, VCS friendly • Safe and easy rollback Friday, October 14, 2011
Local perl environment Using local::lib and cpanm -L Each app
has an isolated local library path Friday, October 14, 2011
Fast and safe install cpanm 1.5 Saves MYMETA.json and install
meta info Friday, October 14, 2011
Dep tree analysis Rebuild the dependency tree from meta info
Checks if anything is missing/superflous Friday, October 14, 2011
Locking versions Versions are saved in carton.lock including dependencies Friday,
October 14, 2011
Easy Redeployment Reinstall exactly the same set of modules on
another prod/development machines. Friday, October 14, 2011
Single-file, VCS friendly You can add carton.lock to git update
whenever you update modules Friday, October 14, 2011
Safe and easy rollback revert the lock file and redeploy
Friday, October 14, 2011
DEMO Friday, October 14, 2011
> cpanm Carton Friday, October 14, 2011
WARNING It is beta software, some features are missing or
not working correctly (yet). Friday, October 14, 2011
github.com/miyagawa/carton irc.perl.org #carton Friday, October 14, 2011
Questions? Friday, October 14, 2011
Thanks! twitter.com/miyagawa Friday, October 14, 2011