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
Introduction to perlbrew
Search
Kang-min Liu
October 13, 2011
Technology
2
1.8k
Introduction to perlbrew
The perlbrew introduction talk I gave in YAPC::Asia 2011.
Kang-min Liu
October 13, 2011
Tweet
Share
More Decks by Kang-min Liu
See All by Kang-min Liu
Elasticsearch Intro
gugod
6
600
Event-driven programming with Perl
gugod
7
1.5k
Other Decks in Technology
See All in Technology
SNSマーケティングに革新! ABEMA サッカー動画切り出しを生成AIで自動化し、業務効率化を狙う! / abema-ai-marketing
cyberagentdevelopers
PRO
1
110
成長中のFanTech領域におけるBiomeを活用したCIの高速化 / fantech-web-biome
cyberagentdevelopers
PRO
2
100
ガチ勢によるPipeCD運用大全〜滑らかなCI/CDを添えて〜 / ai-pipecd-encyclopedia
cyberagentdevelopers
PRO
3
230
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
240
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
ガバメントクラウド先行事業中間報告を読み解く
sugiim
1
1.7k
AWS パートナー企業でテクニカルサポートに従事して 3年経ったので思うところをまとめてみた
kazzpapa3
0
130
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
440
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
180
ZOZOTOWNのホーム画面をパーソナライズすることの難しさと裏話を語る
f6wbl6
0
160
家具家電付アパートの冷蔵庫をIoT化してみた!
scbc1167
0
130
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
10
2.2k
Featured
See All Featured
Visualization
eitanlees
145
15k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Embracing the Ebb and Flow
colly
84
4.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How STYLIGHT went responsive
nonsquared
95
5.2k
Building Adaptive Systems
keathley
38
2.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Practical Orchestrator
shlominoach
186
10k
Automating Front-end Workflow
addyosmani
1365
200k
Transcript
None
Kang-min Liu @gugod
/me @gugod, ཱུ߁ຽ, Kang-min Liu Web programmer CPAN Author for
~100 distributions http://perlbrew.pl
/me @gugod, ཱུ߁ຽ, Kang-min Liu { Perl, Ruby, Javascript, HTML,
CSS, SQL, Photoshop } programmer CPAN Author for ~100 distributions http://perlbrew.pl
perlbrew
←
← /usr/bin/perl /usr/local/bin/perl /opt/local/bin/perl /home/gugod/local/bin/perl
← /usr/bin/perl5.8.8 /usr/bin/perl5.10.0 /usr/bin/perl site_lib is preserved after upgrade @INC
gets longer and longer.
The awesomeness perl is very backward compatible Ideal for production
keep upgrading perl is generally OK don’t necessarily have to upgrade cpan modules following a perl upgrade.
The huh CPAN modules are not necessarily backward compatible. XS
modules might need to be recompiled with new perl Upgrading modules might not be avoidable.
The hmm The current CPAN architecture sort of encourages upgrading
The default is to install the latest version of modules. Upgrading CPAN modules isn’t necessarily smooth.
The err Errors happens at runtime XS errors happens at
install / compile time and it is ^%@&* to solve.
Worst of all Have to upgrade perl before doing all
that. an all-in-ish move
Worst of all Dirty state 100 CPAN modules are updated
1 failed Can’t easily revert
retreat cp /usr/bin/perl${old} /usr/bin/perl old perl does not contain new
site_lib
But what if Upgrade perl for... performance bug-fixes evaluation
Practicals Module authors have to correctly specify module dependencies. Module
users have to run tests in order to reveal runtime errors. assuming there are sufficient numbers of tests
!
perlbrew A tool to install different versions of perls
admin-free perl installation management
beer-driven software development
rvm 1.8, 1.9, ree, jruby, rubinus, macruby, maglev, ironruby
perlbrew 5.8, 5.9, 5.10, 5.11, 5.12, 5.13, 5.14, 5.15
Installation # 1 curl -kL http://xrl.us/perlbrewinstall | bash # 2
cpan -i App::perlbrew perlbrew init
Usage perlbrew install perl-5.12.2 perlbrew install perl-5.13.5 perlbrew install perl-5.10.1
perlbrew install perl-5.8.8 * Internet connection is required
Usage perlbrew use perl-5.14.2 perlbrew use perl-5.15.5 perlbrew switch perl-5.14.2
perlbrew off
Usage perlbrew list
> perlbrew list perl-5.10.0 perl-5.10.1 perl-5.10.1 perl-5.12.3 perl-5.14.1 * perl-5.14.2
perl-5.14.2@app-awesome perl-5.15.3
Usage perlbrew lib
Usage perlbrew lib list perlbrew lib create nobita perlbrew lib
create perl-5.14.2@nobita perlbrew use perl-5.14.2@nobita perlbrew lib delete perl-5.12.3@nobita
cd ~/src/App-Awesome perlbrew use perl-5.10.1@app-awesome perlbrew use perl-5.14.2@app-awesome cd ~/src/Module-Awesome
perlbrew use perl-5.10.1@nobita perlbrew use perl-5.14.1@nobita perlbrew use perl-5.14.2@nobita
perlbrew use perl-5.10.1@app-awesome
perlbrew use perl-5.10.1@app-awesome perl installation name
perlbrew use perl-5.10.1@app-awesome local::lib name
perlbrew use perl-5.10.1@app-awesome
eval `perl -Mlocal::lib=~/.perlbrew/ libs/perl-5.10.1@app-awesome/`
% perl -V ... Compiled at Sep 27 2011 14:08:36
%ENV: PERL5LIB="/Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome/lib/perl5/darwin-2level:/ Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome/lib/perl5" PERLBREW_BASHRC_VERSION="0.30," PERLBREW_HOME="/Users/gugod/.perlbrew" PERLBREW_LIB="app-awesome" PERLBREW_PATH="/Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome/bin:/Users/gugod/ perl5/perlbrew/bin:/Users/gugod/perl5/perlbrew/perls/perl-5.14.2/bin" PERLBREW_PERL="perl-5.14.2" PERLBREW_ROOT="/Users/gugod/perl5/perlbrew" PERLBREW_VERSION="0.30" PERL_LOCAL_LIB_ROOT="/Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome" PERL_MB_OPT="--install_base /Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome" PERL_MM_OPT="INSTALL_BASE=/Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome" @INC: /Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome/lib/perl5/darwin-2level /Users/gugod/.perlbrew/libs/perl-5.14.2@app-awesome/lib/perl5 /Users/gugod/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level /Users/gugod/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2 /Users/gugod/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level /Users/gugod/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2
perlbrew.pl 0.30
Properties isolated perl installations bin, site_lib, local::lib install a new
version ≠ upgrade @INC does not include old site_lib
Benefits `sudo cpan` is no more easier-to-clean perl environments Nuke
the whole thing to clean the mess No old @INC
Benefits per-app isolated perl environments setup. avoid, in advance, any
possible incompatible issues with other apps. know your libs
avoid lib conflicts with what you had install older versions
of modules without worries to break other app code. cpanm http://URL.TO/Mo-0.1.tar.gz App::pmuninstall Benefits
Rationale Don’t mess up vendor perl too much. Learn new
stuffs in the dev version of perl. keep up with the fashion
Rationale Test modules or apps ... with newer perl ...
with older perl
Rationale Test perl itself -Dusethreads -Duse64bitall -Duse64bitint Configure -h -D
-U -A
Rationale spare some guts B, XS Better with a perl
built with DEBUGGING
Thoughts perlbrew « cpanm, ack, rvm
Thoughts One standalone program embed non-core modules very easy distribution
runs a tiny bit faster
Thoughts rvm bash programming master-piece developer-friendly experiences production uses
Further Thoughts Deprecate switch/use to external perl Improve multi-user scenario
More related tool to help developer identify module upgrade failure, and revert to a good state.
Further Thoughts Good + Simple toolkit Keep new-comers by not
frustrating them Grow the community
Simple is Hard
Development http://github.com/gugod/App-perlbrew 49 contributors Feedback github issue / pull requests
rt.cpan.org #perlbrew on twitter
Development http://perlbrew.pl Documentation / Updates A static version of github
Wiki
Thank You