Catalyst::Model::Adaptor
Upcoming SlideShare
Loading in...5
×
 

Catalyst::Model::Adaptor

on

  • 5,233 views

CatCon#1

CatCon#1

Statistics

Views

Total Views
5,233
Views on SlideShare
5,229
Embed Views
4

Actions

Likes
3
Downloads
18
Comments
0

1 Embed 4

http://www.slideshare.net 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Catalyst::Model::Adaptor Catalyst::Model::Adaptor Presentation Transcript

  • Catalyst::Model::Adaptor Hideo Kimura (hide-k)
  • Catalyst のいやんなところ • component が context に依存してるー>特に Model! • MyApp::M::Foo にビジネスロジックを実装する と Catalyst でしか使えない • Test が面倒くさい!
  • そこで C::M::Adaptor • 既存クラスを C::Model にしてくれる アダプタークラス • 必要なのは – Model にしたいクラス • 超簡単!
  • 作り方 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;