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
940
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
いざ、BSC討伐の旅
nikinusu
2
780
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
490
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
280
AGIについてChatGPTに聞いてみた
blueb
0
130
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
It's Worth the Effort
3n
183
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Done Done
chrislema
181
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Why Our Code Smells
bkeepers
PRO
334
57k
Fireside Chat
paigeccino
34
3k
Statistics for Hackers
jakevdp
796
220k
Visualization
eitanlees
145
15k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
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