Catalyst::Model::Adaptor

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Catalyst::Model::Adaptor - Presentation Transcript

    1. Catalyst::Model::Adaptor Hideo Kimura (hide-k)
    2. Catalyst のいやんなところ • component が context に依存してるー>特に Model! • MyApp::M::Foo にビジネスロジックを実装する と Catalyst でしか使えない • Test が面倒くさい!
    3. そこで C::M::Adaptor • 既存クラスを C::Model にしてくれる アダプタークラス • 必要なのは – Model にしたいクラス • 超簡単!
    4. 作り方 Helper がついてる script/myapp_create model Foo Adaptor Foo::Class create package MyApp::Model::Foo; use strict; use warnings; use base 'Catalyst::Model::Adaptor'; __PACKAGE__->config( class => ‘Foo::Class', constructor => ‘create', ); 1;
    5. 呼び出し方 sub bar : Local { my ($self, $c) = @_;

    Hideo KimuraHideo Kimura, 2 years ago

    custom

    1569 views, 1 favs, 0 embeds more stats

    CatCon#1

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 1569
      • 1569 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 15
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories

    Tags