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
480
Carton at London Perl Workshop 2013
miyagawa
0
240
Managing CPAN dependencies with Carton
miyagawa
0
260
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
930
10 Years: LL, you and me
miyagawa
2
180
Plack 1.0 announcement at OSCON
miyagawa
1
240
Other Decks in Technology
See All in Technology
【shownet.conf_】多様化するネットワーク環境を柔軟に統合するルーティングテクノロジー
shownet
PRO
0
360
Azure App Service on Linux の Sidecar に Phi-3 を配置してインテリジェントなアプリケーションを作ってみよう/jazug-anniv14
thara0402
0
330
Azure Verified Moduleを触って分かった注目ポイント/azure-verified-module-begin
mhrtech
1
340
【shownet.conf_】クロージングセッション
shownet
PRO
0
290
【shownet.conf_】AI技術とUX監視の応用でShowNetの基盤を支えるモニタリングシステム
shownet
PRO
0
350
Efficient zero-copy networking using io_uring
ennael
PRO
0
320
いまからでも遅くない! コンテナでWebアプリケーションを 動かしてみよう(2-1)WebAPI座学
nomu
0
150
ADRを運用して3年経った僕らの現在地
onk
PRO
10
4.5k
クレジットカードを製造する技術
yutadayo
80
44k
kube-vipとkube-proxy置き換えCiliumを積んだ究極のK3sクラスタを建てる
logica0419
4
200
Oracle GoldenGate 23ai 導入Tips
oracle4engineer
PRO
1
250
YAPC::Hakodateの映像記録を支える技術
godan
4
210
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
A Modern Web Designer's Workflow
chriscoyier
692
190k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
A better future with KSS
kneath
236
17k
Code Reviewing Like a Champion
maltzj
519
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
4
110
Teambox: Starting and Learning
jrom
131
8.7k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
How GitHub Uses GitHub to Build GitHub
holman
473
290k
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