際際滷

際際滷Share a Scribd company logo
Catalyst
            2008/ 8/22
           @OSC Nagoya
             id:clairvy
Catalyst
Catalyst

 Perl WAF
 MVC
 CPAN        (TT, DBIC)

            Rails
Catalyst 20090822 Osc Nagoya
Catalyst 20090822 Osc Nagoya
JPA

 HTML::FormFu (         /           )

 DBIx::Class (O/R         )

 Data::Localize (             )

 Test::WWW::Mechanize::Catalyst (       )
HTML::FormFu
---
elements:
  - type: Text
    name: user_name
    constraints:
      - Require
  - type: Submit
    name: submit
View       (TT)
<body>
<h1>HTML::FormFu      </h1>
[% form %]
</body>
View               (TT)
<body>
<h1>HTML::FormFu                  </h1>
<form action= method=POST>
<div>
<input type=text name=user_name />
</div>
<input type=submit name=submit />
</form>
</body>
Controller
use parent Catalyst::Controller::HTML::FormFu;
sub form : Local FormCon鍖g {
  my ( $self, $c ) = @_;
  my $form = $c->stash->{form};
  if ($form->submitted_and_valid) {
    #
    }
    #
    $form->default_values($model)
     unless ($form->submitted);
}
Constraints
 Catalyst

 YAPC::Asia 2009 (2009/ 9/10-11)
Catalyst 20090822 Osc Nagoya

More Related Content

Catalyst 20090822 Osc Nagoya