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
Hack cpanm?
Search
Shoichi Kaji
March 25, 2015
0
390
Hack cpanm?
Gotanda.pm Perl Technology Conference #4 2015.03.25
Shoichi Kaji
March 25, 2015
Tweet
Share
More Decks by Shoichi Kaji
See All by Shoichi Kaji
宿泊予約サイトにおける検索と料金計算の両立
skaji
2
2.5k
昔のGo, 今のGo ~比較, ソート編~
skaji
0
170
Perl Quiz
skaji
0
130
cpm at PerlCon 2019
skaji
0
110
Perl5 Package Manager
skaji
0
660
Internal of cpm
skaji
0
570
How to execute external programs in Perl
skaji
3
570
Writing Perl with w0rp/ale
skaji
0
2.2k
nginx unit
skaji
0
44
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Code Reviewing Like a Champion
maltzj
520
39k
Six Lessons from altMBA
skipperchong
27
3.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Language of Interfaces
destraynor
154
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Writing Fast Ruby
sferik
627
61k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Happy Clients
brianwarren
98
6.7k
A Philosophy of Restraint
colly
203
16k
Transcript
Hack cpanm? Shoichi Kaji
About Me • Shoichi Kaji • id: skaji / shoichikaji
/ ks0608 • cpan modules: • App::RemoteCommand • App::FatPacker::Simple
࣍ • cpanm ͱ • cpanm ͷ͕͜͜͜͏ͳΔͱ͍͍ • YAPC::Asia 2013
miyagawa • What can i do? • ༨ஊ : ੲɺplugin system ͱ͍͏ͷ͕͋ͬͨΒ͍͠ • ·ͱΊ
cpanm ͱ • miyagawa ͞Μ͕࡞͍ͬͯΔ cpan client • Very Simple,
ALL IN ONE! • ͨͩ cpanm Plack ͱΕ Plack ͕͑Δɻ
cpanm ͷ͕͜͜͜͏ͳΔͱ͍ ͍ • cpanm ͷ ~ ͷػೳΛଞͷίʔυͰ͍͍ͨ • ྫɿmetadata
ݕࡧ • ྫɿmodule search • cpanm ͷ ~ ͷػೳΛ؆୯ʹม͑ΒΕΔΑ͏ʹͯ͠ཉ͍͠ • ྫɿmodule search • ྫɿґଘؔղܾͷͱ͜ΖͰ ~ ͢Δ
ྫɿmetadata ݕࡧ • cpanm Λ parent ʹͯ͠ίʔυΛॻ͍ͨΒ… • -> https://metacpan.org/pod/Distribution::Metadata
YAPC::Asia 2013 miyagawa • https://speakerdeck.com/miyagawa/whats- new-in-carton-and-cpanm-at-yapc-asia-2013 • cpanm 1.8, cpanfile
1.1, carton 1.1 ͚ͯ • miyagawa ͞ΜࣗਐԽͤ͞ΔͱݴͬͯΔʂ • ͚ͩͲ͍·͍ͪਐΜͰͳ͍ɻ
What can i do?
None
• cpanm module ͷ search ํ๏ͱͯ͠ɺݱ ঢ়Ͱ͍Ζ͍ΖͳͷʹରԠ͍ͯ͠Δɻ͕ɺ ͜ΕΛͬͱ൚༻తʹ͢ΔͨΊʹ CPAN::Common::Index
ʹ͢ΔͷͲ͏͔ɻ
Let’s use CPAN::Common::Index!
just a trial • https://github.com/shoichikaji/cpanminus/ tree/use-common-index • Extract search related
code from cpanm • CPAN::Common::Index::MetaCPAN • add experimental git distribution support
ੲɺplugin γεςϜͱ͍͏ͷ͕ ͋ͬͨΒ͍͠ • https://github.com/miyagawa/cpanminus/commit/ 62ec1f75 • perl Β͍͔͍͍ͬ͜͠ίʔυʂ •
͕ɺ෦ʹΞΫηε͞ΕΔͷͰ͍Ζ͍Ζେมͦ͏ • Changes ʹΑΔͱ2010/02~2010/04 ͷ 2ϲ݄ͷ໋…
·ͱΊ • cpanm ͍͢͝ɻ • ͰɺͻͱΓͰશ෦Γ͗͢ײ͕͋Δ • ػೳΛϥΠϒϥϦʹͯ͠ൈ͖ग़ͤΔͱ͍Ζ͍Ζ͍͍ • plugin
γεςϜʹظ • ·ͩ·ͩ hack Ͱ͖Δͱ͜Ζ͕ͨ͘͞Μ͋Δʂ