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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tatsuhiko Miyagawa
October 14, 2011
Technology
33k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Carton CPAN dependency manager
Tatsuhiko Miyagawa
October 14, 2011
More Decks by Tatsuhiko Miyagawa
See All by Tatsuhiko Miyagawa
Carmel at YAPC::EU 2015
miyagawa
0
610
Carton at London Perl Workshop 2013
miyagawa
0
320
Managing CPAN dependencies with Carton
miyagawa
0
380
What's new in Carton and cpanm at YAPC::Asia 2013
miyagawa
6
1.3k
Carton 1.0 at OSCON 2013
miyagawa
11
2.4k
cpanm 1.6 at OSDC.TW
miyagawa
6
1.4k
10 more things to be ripped off
miyagawa
7
1.4k
Ruby; Exported
miyagawa
1
1.1k
10 Years: LL, you and me
miyagawa
2
260
Other Decks in Technology
See All in Technology
Amazon Bedrock Managed Knowledge BaseDive Deep
ren8k
0
370
ウォーターフォール開発案件のPMとしてAI活用を模索している話
hatahata021
3
270
SmartHR Engineering Team Deck
smarthr
0
160
論語・武士道・産業革命から見る かわるもの、かわらないもの
ichimichi
8
2.2k
初めてのGitHub Actions / GitHub Actions at First
tooppoo
0
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
110
検索技術知識0のエンジニアが広告検索システムを内製化して運用するまで
lycorptech_jp
PRO
0
210
サイバー捜査員研修(前半)
nomizone
1
1.1k
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
210
Atlassian Cloudサポート業務でのAIエージェント活用事例
smt7174
0
310
DevOps Agentで運用判断をチーム資産にする~Agent InstructionsとAgent Skillを継続的に育てる~
fujioka6789
0
200
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
230
The SEO identity crisis: Don't let AI make you average
varn
0
520
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Building Applications with DynamoDB
mza
96
7.2k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
240
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
280
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
200
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