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
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.5k
フルカイテン株式会社 採用資料
fullkaiten
0
36k
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
2024-10-30-reInventStandby_StudyGroup_Intro
shinichirokawano
1
630
Jr. Championsになって、強く連携しながらAWSをもっと使いたい!~AWSに対する期待と行動~
amixedcolor
0
190
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
740
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
物価高なラスベガスでの過ごし方
zakky
0
380
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
140
ユーザーの購買行動モデリングとその分析 / dsc-purchase-analysis
cyberagentdevelopers
PRO
2
100
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Build your cross-platform service in a week with App Engine
jlugia
229
18k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
A Philosophy of Restraint
colly
203
16k
It's Worth the Effort
3n
183
27k
Fireside Chat
paigeccino
32
3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Statistics for Hackers
jakevdp
796
220k
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