| 1 | package Catalyst::Helper::Controller::REST::DBIC::Item; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Catalyst::Helper::Controller::REST::DBIC::Item - Helper to create REST controllers | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | $ catalyst.pl myapp | ||
| 12 | $ cd myapp | ||
| 13 | $ script/myapp_create.pl controller Book REST::DBIC::Item Schema::Book | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | Helper to create REST Base classes. After this, you should be reading up on | ||
| 18 | L<Catalyst::Controller::REST::DBIC::Item> | ||
| 19 | |||
| 20 | =head1 METHODS | ||
| 21 | |||
| 22 | =head2 mk_compclass | ||
| 23 | |||
| 24 | This generates the individual REST classes | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | sub mk_compclass { | ||
| 29 | my ( $self, $helper, $schema_class ) = @_; | ||
| 30 | $helper->{schema_class} = $helper; | ||
| 31 | my $file = $helper->{file}; | ||
| 32 | $helper->render_file( 'compclass', $file ); | ||
| 33 | } | ||
| 34 | |||
| 35 | =head1 SEE ALSO | ||
| 36 | |||
| 37 | L<Catalyst::Controller::REST::DBIC::Item> | ||
| 38 | |||
| 39 | L<Catalyst::Action::REST> | ||
| 40 | |||
| 41 | L<Catalyst::Model::DBIC::Schema> | ||
| 42 | |||
| 43 | =head1 AUTHOR | ||
| 44 | |||
| 45 | J. Shirley C<cpan@coldhardcode.com> | ||
| 46 | |||
| 47 | =head1 LICENSE | ||
| 48 | |||
| 49 | This library is free software . You can redistribute it and/or modify | ||
| 50 | it under the same terms as perl itself. | ||
| 51 | |||
| 52 | =cut | ||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | 1; | ||
| 57 | |||
| 58 | __DATA__ |