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
350
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
Perl Quiz
skaji
0
100
cpm at PerlCon 2019
skaji
0
110
Perl5 Package Manager
skaji
0
590
Internal of cpm
skaji
0
500
How to execute external programs in Perl
skaji
3
510
Writing Perl with w0rp/ale
skaji
0
2.1k
nginx unit
skaji
0
36
Perl6 ecosystem
skaji
1
1.3k
App::RemoteCommand 2018
skaji
0
17
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
91
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Building Applications with DynamoDB
mza
88
5.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
The Language of Interfaces
destraynor
151
23k
Build your cross-platform service in a week with App Engine
jlugia
225
17k
Automating Front-end Workflow
addyosmani
1356
200k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
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 Ͱ͖Δͱ͜Ζ͕ͨ͘͞Μ͋Δʂ