Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduce Sub::Meta

Introduce Sub::Meta

Kenta Kobayashi

May 21, 2021
Tweet

More Decks by Kenta Kobayashi

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • kobaken a.k.a @kfly8 • ϞόΠϧϑΝΫτϦʔ • ΤϯδχΞ૊৫։ൃ੹೚ऀ •

    Ωʔϫʔυ: ODHDɺίʔνϯάɺ 1on1ɺDevOpsɺJobDescription • Japan Perl Association ཧࣄ • ࠷ۙɺ່̑ࡀʹUNOͰෛ͚Δ
  2. use Sub::Identify; sub_name(\&add) # => add stash_name(\&add) # => Foo

    my ($file, $line) = get_code_location(\&add)
  3. my $meta = Sub::Meta->new( sub => \&add ); $meta->subname #

    => add $meta->stashname # => Foo $meta->line # => 3
  4. ࠓޙ͸ʁ • Sub::MetaͷܕදݱΛ҆ఆͤ͞ Δ(issue #42) • Boundary ( Interface࣮૷ )ʹؔ

    ਺໊͚ͩͰͳ͘ɺฦΓ஋ɺҾ਺ ͷܕ΋Ճຯ͢Δ #1 • Ruby3 steepͷΑ͏ͳ੩తͳ νΣοΧʔͷPoC