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
AGIについてChatGPTに聞いてみた
blueb
0
130
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
0
120
Storybook との上手な向き合い方を考える
re_taro
1
180
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
440
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
TypeScript、上達の瞬間
sadnessojisan
46
13k
Terraform Stacks入門 #HashiTalks
msato
0
360
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
110
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Why Our Code Smells
bkeepers
PRO
334
57k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
What's new in Ruby 2.0
geeforr
343
31k
Side Projects
sachag
452
42k
A better future with KSS
kneath
238
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
A designer walks into a library…
pauljervisheath
204
24k
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