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
Introduce Sub::Meta
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kenta Kobayashi
May 21, 2021
Technology
0
94
Introduce Sub::Meta
Kenta Kobayashi
May 21, 2021
Tweet
Share
More Decks by Kenta Kobayashi
See All by Kenta Kobayashi
Perlの生きのこり - YAPC::Fukuoka 2025
kfly8
0
1.8k
プロジェクトの空気を読んで開発してくれるPerlのAIツールがほしい
kfly8
2
710
Perlの生きのこり - エンジニアがこの先生きのこるためのカンファレンス2025
kfly8
4
3k
Tシャツに書かれたコードを読む
kfly8
0
1.4k
研修はイベントでなくコミュニティ作り
kfly8
0
2.1k
明日からできる新人のオンボーディングガイド
kfly8
0
870
メンター成長のためのふりかえり会
kfly8
0
1.4k
Interfaces in Perl5 at The Perl Conference 2019 in Pittsburgh
kfly8
0
3.2k
経験から効率よく学習する
kfly8
0
470
Other Decks in Technology
See All in Technology
Windows ネットワークを再確認する
murachiakira
PRO
0
170
20260222ねこIoTLT ねこIoTLTをふりかえる
poropinai1966
0
300
全自動で回せ!Claude Codeマーケットプレイス運用術
yukyu30
3
140
ソフトウェアアーキテクトのための意思決定術: Create Decision Readiness—The Real Skill Behind Architectural Decision
snoozer05
PRO
27
7.6k
AI が Approve する開発フロー / How AI Reviewers Accelerate Our Development
zaimy
1
230
サンタコンペ2025完全攻略 ~お前らの焼きなましは遅すぎる~
terryu16
1
540
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
95k
LY Tableauでの Tableau x AIの実践 (at Tableau Now! - 2026-02-26)
yoshitakaarakawa
0
950
もう怖くないバックグラウンド処理 Background Tasks のすべて - Hakodate.swift #1
kantacky
0
220
三菱UFJ銀行におけるエンタープライズAI駆動開発のリアル / Enterprise AI_Driven Development at MUFG Bank: The Real Story
muit
10
20k
社内ワークショップで終わらせない 業務改善AIエージェント開発
lycorptech_jp
PRO
1
400
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
Typedesign – Prime Four
hannesfritz
42
3k
Done Done
chrislema
186
16k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
The Mindset for Success: Future Career Progression
greggifford
PRO
0
260
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
460
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
76
Transcript
Introduce Sub::Meta kobaken a.k.a @kfly8 Perlͷ։ൃମݧΛྑ͍͖ͯ͘͠💪
ࣗݾհ • kobaken a.k.a @kfly8 • ϞόΠϧϑΝΫτϦʔ • ΤϯδχΞ৫։ൃऀ •
Ωʔϫʔυ: ODHDɺίʔνϯάɺ 1on1ɺDevOpsɺJobDescription • Japan Perl Association ཧࣄ • ࠷ۙɺ່̑ࡀʹUNOͰෛ͚Δ
Perlͷ։ൃମݧΛྑ͍ͨ͘͠💪
։ൃମݧʹ͔ܽͤͳ͍ • ڧྗͳΤϥʔνΣοΫ • ิ • ϑΥʔϚολ • ύϑΥʔϚϯε্ •
ͳͲ
ใ ߏจɾɾܕ औಘ ར༻
ใ ߏจɾɾܕ औಘ ར༻ PPI Compiler::Lexer PPR
ใ ߏจɾɾܕ औಘ ར༻ Perl::Critic Perl::Lint Perl::MinimumV ersion Perl::LanguageS erver
Spellunker::Pe rl
ใ ߏจɾɾܕ औಘ ར༻ RBS steep Sorbet RBI TypeProf ࢀߟɿhttps://techlife.cookpad.com/entry/2020/12/09/120454
ใ ߏจɾɾܕ औಘ ར༻ Sub::Meta
ใ ߏจɾɾܕ औಘ ར༻ Sub::Meta Types::TypedCodeRef Boundary Types::HasTypedMethods
খ·ͱΊ • PerlͰ։ൃମݧΛྑ͍͖ͯ͘͠💪 • ͦͷͨΊʹɺϓϩάϥϜ͔Βใ Λऔಘ͠ར༻͢ΔྲྀΕΛଊ͑Δ • Sub::Metaɺ͜ͷྲྀΕͰ͍͏ਅ ΜதͷཱͪҐஔ •
ؔͷϝλใΛར༻͘͢͠ ΔͨΊͷΦϒδΣΫτ܅
PerlͰؔͷϝλใΛ ѻ͏ͱ͖ͷࠞཚ ಛʹҾɺฦΓ
None
ؔaddͷϝλใ ໊ؔʁ add ύοέʔδʁ Foo Կߦ͔Βఆٛ͞Ε͍ͯΔʁ 3ߦ
use Sub::Identify; sub_name(\&add) # => add stash_name(\&add) # => Foo
my ($file, $line) = get_code_location(\&add)
my $meta = Sub::Meta->new( sub => \&add ); $meta->subname #
=> add $meta->stashname # => Foo $meta->line # => 3
ͰɺҾʁ
None
None
None
None
ࢁ͋ΔPerlͷ όϦσʔγϣϯϞδϡʔϧୡ
None
None
None
ҾόϦσʔγϣϯ܅͝ͱʹ ϝλใͷऔΓѻ͏ͷ໘
ใ ؔͷϝλ Sub::Meta Data::Validator Smart::Args Type::Params Function::Parameters Sub::WrapInType …
DEMO
ฦΓόϦσʔγϣϯ܅ ಉ༷ͷΞϓϩʔνͰղܾ
ใ ؔͷϝλ Sub::Meta Return::Type Function::Return Sub::WrapInType …
·ͱΊ • Perlͷ։ൃମݧΛྑ͍͖ͯ͘͠ 💪 • Sub::MetaɺؔͷҾɺฦ ΓؚΊͨϝλใΛ Sub::Metaʹू͠ɺ౷Ұతͳ ΠϯλʔϑΣʔεͰؔͷϝλ ใΛѻ͑ΔΑ͏ʹ͢Δ܅
ࠓޙʁ • Sub::MetaͷܕදݱΛ҆ఆͤ͞ Δ(issue #42) • Boundary ( Interface࣮ )ʹؔ
໊͚ͩͰͳ͘ɺฦΓɺҾ ͷܕՃຯ͢Δ #1 • Ruby3 steepͷΑ͏ͳ੩తͳ νΣοΧʔͷPoC