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
What's new in Carton and cpanm at YAPC::Asia 2013
Search
Tatsuhiko Miyagawa
September 21, 2013
Technology
6
1.2k
What's new in Carton and cpanm at YAPC::Asia 2013
Tatsuhiko Miyagawa
September 21, 2013
Tweet
Share
More Decks by Tatsuhiko Miyagawa
See All by Tatsuhiko Miyagawa
Carmel at YAPC::EU 2015
miyagawa
0
490
Carton at London Perl Workshop 2013
miyagawa
0
250
Managing CPAN dependencies with Carton
miyagawa
0
270
Carton 1.0 at OSCON 2013
miyagawa
11
2.2k
cpanm 1.6 at OSDC.TW
miyagawa
6
1.3k
10 more things to be ripped off
miyagawa
7
1.3k
Ruby; Exported
miyagawa
1
950
10 Years: LL, you and me
miyagawa
2
180
Plack 1.0 announcement at OSCON
miyagawa
1
250
Other Decks in Technology
See All in Technology
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
280
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
180
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
CustomCopを使ってMongoidのコーディングルールを整えてみた
jinoketani
0
220
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
2
2.1k
なぜCodeceptJSを選んだか
goataka
0
160
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
730
UI State設計とテスト方針
rmakiyama
2
320
Featured
See All Featured
How GitHub (no longer) Works
holman
311
140k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
We Have a Design System, Now What?
morganepeng
51
7.3k
Music & Morning Musume
bryan
46
6.2k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.3k
Statistics for Hackers
jakevdp
796
220k
How STYLIGHT went responsive
nonsquared
95
5.2k
GitHub's CSS Performance
jonrohan
1030
460k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Transcript
What's new in Carton & cpanm Tatsuhiko Miyagawa YAPC::Asia 2013
Keio University Saturday, September 21, 13
Me • Tatsuhiko Miyagawa • Lives in San Francisco •
{github,twitter,CPAN}/miyagawa Saturday, September 21, 13
Saturday, September 21, 13
speakerdeck.com /miyagawa Saturday, September 21, 13
Agenda • cpanm 1.6 / 1.7 • Carton 1.0 •
What's Next Saturday, September 21, 13
cpanminus tiny, standalone CPAN installer that "just works" Saturday, September
21, 13
vs. other installers Sane defaults. Quiet output. Fast and lightweight.
One file install. Saturday, September 21, 13
% curl -‐L cpanmin.us \ | perl -‐ App::cpanminus Saturday,
September 21, 13
♥ perlbrew, plenv Saturday, September 21, 13
cpanm 1.6 released in 2/26 Saturday, September 21, 13
Pinning versions Flexible version query Saturday, September 21, 13
> cpanm
[email protected]
> cpanm Plack~">= 1.0, < 2.0" Saturday,
September 21, 13
♥ MetaCPAN Saturday, September 21, 13
--dev Saturday, September 21, 13
install via git Saturday, September 21, 13
> cpanm git://github.com/plack/Plack.git@devel Saturday, September 21, 13
cpanfile support Saturday, September 21, 13
> cat cpanfile requires 'Plack', '1.0000'; > cpanm -‐-‐installdeps .
Saturday, September 21, 13
cpanm 1.7 9/4, 2013 Saturday, September 21, 13
Major changes • Smaller executable size: 350KB -> 230KB •
♥ Travis CI • Better prerequisite spec support • Build Args support • Uninstall Saturday, September 21, 13
Saturday, September 21, 13
# cpanfile on develop => sub { requires 'Test::Pod'; recommends
'Devel::NYTProf'; }; > cpanm --installdeps . \ --with-develop \ --with-recommends Saturday, September 21, 13
# cpanfile feature 'sqlite' => sub { requires 'DBD::SQLite' recommends
'DBI', 3.1; }; > cpanm --installdeps . \ --with-feature=sqlite Saturday, September 21, 13
# travis.yml install: cpanm -nq --installdeps \ --with-develop --with-recommends Saturday,
September 21, 13
cpanm DBD::mysql \ --configure-args="--with-mysql=/usr/local/ mysql" Saturday, September 21, 13
cpanm --uninstall DBI cpanm -U DBI Saturday, September 21, 13
github.com/ miyagawa/cpanminus Saturday, September 21, 13
Carton Bundler for Perl Saturday, September 21, 13
Managing CPAN Dependencies Saturday, September 21, 13
Why you need it Saturday, September 21, 13
(snip) http://yapcasia.org/2011/talk/91 Saturday, September 21, 13
“Upgrading CPAN modules broke my app” Saturday, September 21, 13
Dependencies are part of your app. Saturday, September 21, 13
cpanfile + cpanm • Simple • Yet powerful and flexible
way to describe dependencies and version requirements • Version control cpanfile Saturday, September 21, 13
# cpanfile requires 'Plack', '== 1.0001'; requires 'DBI', '== 3.2';
... Saturday, September 21, 13
caveats • Locking each dependency with specific version is tedious
work • Can only lock direct dependencies • MetaCPAN as SPOF • No easy/reliable way to fallback Saturday, September 21, 13
Carton Saturday, September 21, 13
Basic idea: Describe CPAN dependencies snapshot tarball pathnames Saturday, September
21, 13
Built on top of: cpanfile + cpanm 1.6 Saturday, September
21, 13
carton 1.0 released in 8/4 Saturday, September 21, 13
What's new in 1.0 • No Makefile.PL/Build.PL support (cpanfile) •
cpanfile.snapshot (no carton.lock) • 20x faster tree command • More reliable version extraction • carton update, carton bundle • fatpack executable for bootstrap Saturday, September 21, 13
DEMO Saturday, September 21, 13
gum.co/BmXz Saturday, September 21, 13
Deployment with Carton Saturday, September 21, 13
@local> carton install @local> git commit cpanfile.snapshot @local> git push
@remote> carton install -‐-‐deployment @remote> carton exec plackup ... Saturday, September 21, 13
Example: github.com/miyagawa/cpanmetadb-perl capistrano, Server::Starter, carton, plackup (twiggy) Saturday, September 21,
13
PaaS/Cloud github.com/miyagawa/heroku-buildpack-perl Saturday, September 21, 13
Saturday, September 21, 13
http://weblog.bulknews.net Saturday, September 21, 13
Support to come! Dokku, DotCloud, Travis CI, Cloud Foundry etc.
Saturday, September 21, 13
github.com/miyagawa/carton irc.perl.org #carton Saturday, September 21, 13
Sneak Preview Saturday, September 21, 13
cpanm 1.8 cpanfile 1.1 Carton 1.1 Saturday, September 21, 13
BETA Saturday, September 21, 13
cpanm 1.8 git (+ any URL) support in index Saturday,
September 21, 13
cpanfile 1.1 git syntax support Saturday, September 21, 13
requires 'Plack', '1.0000', git => 'git://github.com/plack/Plack.git', ref =>
'devel'; carton 1.1 Saturday, September 21, 13
requires 'Plack', '1.0011', dist => 'MIYAGAWA/Plack-‐1.0011.tar.gz'; carton 1.1 Saturday,
September 21, 13
requires 'Plack', '1.0011', dist => 'http://darkpan/Plack-‐1.tar.gz'; carton 1.1 Saturday,
September 21, 13
(demo) Saturday, September 21, 13
cpanm 1.8 • Rewrite internals • Backend API • Plugin
support • CPAN Testers support (via plugins) Saturday, September 21, 13
carton 1.1 • configure args/hints support • safe exec on
development • remember options (--path etc.) Saturday, September 21, 13
Thank you! Saturday, September 21, 13
speakerdeck.com /miyagawa Saturday, September 21, 13