28. Moose
• A postmodern object system for Perl5
• Meta Object Protocol sugar syntax
29. Moose
• A postmodern object system for Perl5
• Meta Object Protocol sugar syntax
• attributes
30. Moose
• A postmodern object system for Perl5
• Meta Object Protocol sugar syntax
• attributes
• method modifiers
31. Moose
• A postmodern object system for Perl5
• Meta Object Protocol sugar syntax
• attributes
• method modifiers
• roles
32. Application
package MyApp;
use strict;
use warnings;
use parent qw/Catalyst/;
use Catalyst qw/
-Debug
ConfigLoader
Static::Simple/;
__PACKAGE__->config( name => 'MyApp' );
__PACKAGE__->setup();
1;
96. Catalyst::Test
use strict;
use warnings;
use Test::More;
use HTTP::Request::Common;
BEGIN { use_ok 'Catalyst::Test', 'MyApp' }
my $req = GET('/');
my $res = request($req); #$res = get(‘/’)
ok($res->is_success, 'index return ok');
is($res->content_type, 'text/html', 'content type
is HTML');
like($res->content, qr/Home/, 'contains Home');
done_testing();
97. Catalyst::Test
...
my ($res, $c) = ctx_request('/');
ok($res->is_success, 'index return ok');
is($c->stash->{foo}, 'foo', 'statsh foo is foo');
...
103. PSGI
• Perl Server Gateway Interface
• just specification, not implementation
• start developing at 2009/09/04
• talk in this morning
• miyaga-san, tokuhirom-san