Slide 1

Slide 1 text

1FSM001ػߏ೥࢙ !NP[OJPO :"1$)BLPEBUFඇެࣜ༧शձ

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

ࣗݾ঺հ

Slide 4

Slide 4 text

4NBSU#BOL *OD 4PGUXBSF&OHJOFFS 'BWPSJUF1FSMTCVJMUJOEP LJMM BOEEJF 5BJLJ,BXBLBNJ !NP[OJPO !NP[OJPO !NP[OJPO

Slide 5

Slide 5 text

1FSM001ػߏ೥࢙ !NP[OJPO :"1$)BLPEBUFඇެࣜ༧शձ

Slide 6

Slide 6 text

1FSM͸प೥ʂ

Slide 7

Slide 7 text

೥ 1FSM஀ੜ

Slide 8

Slide 8 text

CMFTT ʙॕ෱͋Εʙ

Slide 9

Slide 9 text

CMFTT package User; use strict; use warnings; use utf8; sub new { my ( $ class, $args) = @_ ; return bless { name => $args->{name}, email => $args->{email}, }, $class; } sub get_name { my ( $ self) = @_ ; return $self->{name}; } 1; ಋೖ 1FSM QBDLBHF͕Ϋϥεతʹ;Δ·͍ɺ CMFTTͰσʔλ SFGFSFODF Λ QBDLBHFʹඥ෇͚ NFUIPE΋ఆٛͰ͖Δ ϓϦϛςΟϰͳ001

Slide 10

Slide 10 text

CMFTT package User; use strict; use warnings; use utf8; sub new { my ( $ class, $args) = @_ ; return bless { name => $args->{name}, email => $args->{email}, }, $class; } sub get_name { my ( $ self) = @_ ; return $self->{name}; } 1; ಋೖ 1FSM QBDLBHF͕Ϋϥεతʹ;Δ·͍ɺ CMFTTͰσʔλ SFGFSFODF Λ QBDLBHFʹඥ෇͚ NFUIPE΋ఆٛͰ͖Δ ϓϦϛςΟϰͳ001

Slide 11

Slide 11 text

೥ͷ࣌Λܦͯ DMBTT

Slide 12

Slide 12 text

DMBTT use strict; use warnings; use feature 'class'; no warnings qw/exper im ental::class/; class User { field $name :param; field $email :param; method get_name { return $name; } } ಋೖ 1FSM ͍ΘΏΔී௨ͬΆ͍DMBTTߏจ fi FME΍NFUIPE΋αϙʔτ ͝ཡͷͱ͓ΓFYQFSJNFOUBM

Slide 13

Slide 13 text

ΊͰͨ͠ΊͰͨ͠

Slide 14

Slide 14 text

Slide 15

Slide 15 text

DMBTTߏจಋೖ·Ͱʹ৭ʑ͋ͬͨ

Slide 16

Slide 16 text

৭ʑ $MBTT4USVDU $MBTT"DDFTTPS $MBTT"DDFTTPS'BTU $MBTT"DDFTTPS'BTUFS $MBTT"DDFTTPS-JUF $MBTT$MBTT $MBTT$POUSBDU $MBTT4JNQMF $MBTT&BTZ $MBTT5JOZ $MBTT4UE $MBTT(FOFSBUF $MBTT.FUIPE.BLFS 3VCZJTI$MBTT .PPTF .PVTF .PP .P . .PPT .PVTTF .PN %JPT .V 4QJ ff Z 3PMF5JOZ .PKP#BTF .01 $MBTT.01 $PS 1FSM 3BLV BOEFUD

Slide 17

Slide 17 text

೥୅ޙ൒

Slide 18

Slide 18 text

$MBTT4USVDU ಋೖ 1FSM QBDLBHFʹରͯ͠NFNCFSΛඥ෇͚Δ ه๏Λαϙʔτ ΞΫηα΋ࣗಈͰੜ͑ͯ͘Δ ίΞϞδϡʔϧ package User; use Class::Struct; struct(User => { name => '$', email => '$', }); # ͜Μͳײ͡Ͱ࢖͑Δ my $user = User->ne w ( name => 'john', email => '[email protected]', ); say $user->name; # john $user->name('doe'); say $user->name; # doe

Slide 19

Slide 19 text

$MBTT"DDFTTPS ϦϦʔε QBDLBHFʹରͯ͠ΞΫηαΛ ಈతʹੜ੒͢Δ ͞·͟·ͳߴ଎ɾܰྔͳ೿ੜ͕͋Δ $MBTT"DDFTTPS'BTU $MBTT"DDFTTPS'BTUFS $MBTT"DDFTTPS-JUF package User; use base q w (Class::Accessor); User->follo w_ best_practice; User->mk_accessors(q w (name email)); # ͜͏͍͏;͏ʹ࢖͑Δ my $user = User->ne w ({ name => 'john', email => '[email protected]', }); say $user->{name}; # john $user->set('name', 'doe'); # getterΛհͯ͠ΞΫηε΋Ͱ͖Δ say $user->get('name'); # doe

Slide 20

Slide 20 text

೥୅ 1FSM 3BLV ϔϥδΧऻདྷ େ.01࣌୅

Slide 21

Slide 21 text

3BLVͷDMBTT ೥͝Ζ͔Β։ൃ։࢝ ϦϦʔε .01͕࣮૷͞Ε͍ͯΔ

Slide 22

Slide 22 text

.PPTF ϦϦʔε ຊ֨తͳΦϒδΣΫτγεςϜ͕஀ੜ 3BLV ౰࣌1FSM ͷΞΠσΞΛഈआ .01ίϯηϓτ package User; use Moose; has 'name' => (is => 'rw', isa => 'Str'); has 'email' => (is => 'rw', isa => 'Str'); sub greet { my $self = shift; return "hello, ". $ self->name; } # ͜͏͍͏;͏ʹ࢖͑Δ my $user = User->ne w ({ name => 'john', email => '[email protected]', }); say $user->name; # john $user->name('doe'); say $user->name; # doe say $user->greet; # hello, doe

Slide 23

Slide 23 text

.01 .FUB0CKFDU1SPUPDPM 1FSMͱ1FSMͷ001ίϯηϓτ Ϋϥε͸ΦϒδΣΫτ ΫϥεʹରԠ͢ΔϝλΦϒδΣΫτͰ͋ΔϝλΫϥε͕ଘࡏ͢Δ Ϋϥεͷৼ෣͍Λఆٛ͢Δ ϝλΫϥεΛ௨͢͜ͱͰϝιου΍ଐੑͷ௥Ճ࡟আΛಈతʹߦͳ͑Δ ଐੑɺϝιουɺϩʔϧ NJYJO ɺϝιουϞσΟϑΝΠΞͳͲۙ୅తͳ 001ػߏΛ۩උ .PPTF଒͸͜ͷ.01Λ࣮૷͍ͯ͠Δ

Slide 24

Slide 24 text

.PPTF଒ .PPTFΦϦδφϧɻॏ͍ɾ஗͍ͳͲͱݴΘΕ͍ͯͨ ࠓ͸஌Βͳ͍ .PVTF.PPTFޓ׵ɻ94Ͱॻ͔Ε͍ͯΔͨΊͱͯ΋଎͍ɻ .PP.PPTFޓ׵ αϒηοτ ɻܰྔͳ11࣮૷ɻΑ͘࢖ΘΕ͕ͪɻ .P.PPͷߋʹϛχϚϧͳόʔδϣϯ .ۃΊ͍ͯܰɻͳͥͳΒԿ΋࣮૷͞Ε͍ͯͳ͍ͨΊʜʜ δϣʔΫϞδϡʔϧ

Slide 25

Slide 25 text

.PPTF଒ .PPTFΦϦδφϧɻॏ͍ɾ஗͍ͳͲͱݴΘΕ͍ͯͨ ࠓ͸஌Βͳ͍ .PVTF.PPTFޓ׵ɻ94Ͱॻ͔Ε͍ͯΔͨΊͱͯ΋଎͍ɻ .PP.PPTFޓ׵ αϒηοτ ɻܰྔɻΑ͘࢖ΘΕ͕ͪɻ .P.PPͷߋʹϛχϚϧͳόʔδϣϯ .ۃΊ͍ͯܰɻͳͥͳΒԿ΋࣮૷͞Ε͍ͯͳ͍ͨΊʜʜ δϣʔΫϞδϡʔϧ

Slide 26

Slide 26 text

༨ஊ .PKPMJDJPVT͸.01ϕʔεͷ001Λࣗલ࣮૷͍ͯ͠Δ .PKP#BTF ྲྀੴͷ43*ޚେͰ͋Δ ࠓ ೥Ҏ߱ Ͱ͸$MBTT"DDFTTPS΋.PPTFϥΠΫͳߏจΛఏڙ͍ͯ͠Δ ஌Βͳ͔ͬͨ

Slide 27

Slide 27 text

೥୅͋ͨΓ͔Β 1FSMͷίΞʹDMBTTΛೖΕΑ͏Ϝʔϒϝϯτ

Slide 28

Slide 28 text

DMBTTΛೖΕΑ͏Ωϟϯϖʔϯ 3PMF5JOZ.PPTF͔Β3PMFػߏΛ੾Γग़࣮ͨ͠૷ .01ίΞϞδϡʔϧ͚ͩͰಈ͘ϛχϚϧ࣮૷ $PSݴޠϨϕϧͰDMBTTػߏΛಋೖ͢ΔͨΊͷίϯηϓτσβΠϯɾఏҊ ॳग़

Slide 29

Slide 29 text

DMBTTΛೖΕΑ͏Ωϟϯϖʔϯ ͝ཡͷΑ͏ʹ 1FSMͷ001͸ϢχʔΫ ৽نϢʔβʔʹͱͬͯ௚ײతͰͳ͍৔߹͕͋Δ ݱ୅తͳ001ػߏͷχʔζ͸े෼ཧղͰ͖Δ .01΋͋Δ͠$PS΋͋Δ͠3BLVͰͷ࣮੷΋͋Δ ͱ͍͏ͱ͜Ζ͔Β1FSMʹDMBTTߏจ͕࣮૷͞ΕΔӡͼʹ ೥ʹ଴๬ͷϦϦʔε

Slide 30

Slide 30 text

1FSM001ͷࠓޙ

Slide 31

Slide 31 text

DMBTTߏจ ·ͩ&YQFSJNFOUBMػೳ ͍ͭTUBCMFʹͳΔͷ͔͸ؾʹͳΔ ใࠂ͞Εͨόά͸͔ͬ͠Γ௚͞Ε͍ͯΔ ແ͍΋ͷ͕ͦͦ͋͜͜Δ NFUIPEBUUSJCVUFT SPMF BDDFTTPSHFOFSBUPS NFUBQSPHSBNNJOH

Slide 32

Slide 32 text

1FSM001ʹର͢Δॴײ CMFTTΛ࢖ͬͨͬͯྑ͍ $MBTT"DDFTTPSΛ࢖ͬͨͬͯྑ͍ .PVTF΍.PPΛ࢖ͬͨͬͯྑ͍ DMBTTΛ࢖ͬͨͬͯྑ͍ ͕ɺݸਓతʹ͸FYQFSJNFOUBM͕֎Ε͔ͯΒɺͦͯ͠3PMF͕࣮૷͞Ε͔ͯΒ ͱ͍͏;͏ʹࢥ͍ͬͯΔ ͦΕ͕ຬ଍͞ΕͨΒDMBTTߏจʹ౷Ұ͍ͨ͠ؾ͕͢Δ 5.5085%* ΍Γํ͸͍͘ΒͰ΋͋Δ

Slide 33

Slide 33 text

·ͱΊ

Slide 34

Slide 34 text

·ͱΊ 1FSM001ͷมભ CMFTT $MBTT"DDFTTPS଒ .PPTF଒ ϙετϞμϯ଒ DMBTTߏจ DMBTTߏจ͕೥ʹಋೖ͞Εͨ ࠓޙʹظ଴ 1FSMʹ΋৽͍͠ػೳ͸ͪΌΜͱೖ͍ͬͯΔͧʂʂʂ

Slide 35

Slide 35 text

2