Catalyst-Model-CDBI-CRUD-0.04000755 001750 001750 00000000000 10323451406 016256 5ustar00marcusmarcus000000 000000 Catalyst-Model-CDBI-CRUD-0.04/templates000755 001750 001750 00000000000 10323451406 020254 5ustar00marcusmarcus000000 000000 Catalyst-Model-CDBI-CRUD-0.04/templates/base000755 001750 001750 00000000000 10323451406 021166 5ustar00marcusmarcus000000 000000 Catalyst-Model-CDBI-CRUD-0.04/templates/base/add000644 001750 001750 00000000612 10274145605 021725 0ustar00marcusmarcus000000 000000 [% USE class = Class(class) %]
[% FOR column = class.columns %] [% NEXT IF column == class.primary_column %] [% column %]
[% class.to_field(column).as_XML %]
[% END %]
List Catalyst-Model-CDBI-CRUD-0.04/templates/base/view000644 001750 001750 00000000323 10274145605 022146 0ustar00marcusmarcus000000 000000 [% FOR column = item.columns %] [% NEXT IF column == item.primary_column %] [% column %]
[% item.$column %]

[% END %] List Catalyst-Model-CDBI-CRUD-0.04/templates/base/edit000644 001750 001750 00000000567 10307552705 022133 0ustar00marcusmarcus000000 000000 [% FOR column = item.columns %] [% NEXT IF column == item.primary_column %] [% column %]
[% item.to_field(column).as_XML %]
[% END %]
List Catalyst-Model-CDBI-CRUD-0.04/templates/base/list000644 001750 001750 00000001702 10274145605 022151 0ustar00marcusmarcus000000 000000 [% USE class = Class(class) %] [% action = c.request.action %] [% primary = class.primary_column %] [% FOR column = class.columns %] [% NEXT IF column == primary %] [% END %] [% FOR object = class.retrieve_all %] [% FOR column = class.columns.list %] [% NEXT IF column == primary %] [% END %] [% END %]
[% column %]
[% object.$column %] View Edit Destroy
Add Catalyst-Model-CDBI-CRUD-0.04/t000755 001750 001750 00000000000 10323451406 016521 5ustar00marcusmarcus000000 000000 Catalyst-Model-CDBI-CRUD-0.04/t/02pod.t000644 001750 001750 00000000276 10274145605 017724 0ustar00marcusmarcus000000 000000 use Test::More; eval "use Test::Pod 1.14"; plan skip_all => 'Test::Pod 1.14 required' if $@; plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; all_pod_files_ok(); Catalyst-Model-CDBI-CRUD-0.04/t/01use.t000644 001750 001750 00000000130 10274145605 017722 0ustar00marcusmarcus000000 000000 use strict; use Test::More tests => 1; BEGIN { use_ok('Catalyst::Model::CDBI::CRUD') } Catalyst-Model-CDBI-CRUD-0.04/t/03podcoverage.t000644 001750 001750 00000000325 10274145605 021434 0ustar00marcusmarcus000000 000000 use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@; plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; all_pod_coverage_ok(); Catalyst-Model-CDBI-CRUD-0.04/META.yml000644 001750 001750 00000001206 10323451406 017605 0ustar00marcusmarcus000000 000000 # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Catalyst-Model-CDBI-CRUD version: 0.04 version_from: CRUD.pm installdirs: site requires: Catalyst: 2.99 Catalyst::Model::CDBI: 0 Catalyst::View::TT: 0 Class::DBI: 0 Class::DBI::AsForm: 0 Class::DBI::FromForm: 0 Class::DBI::Loader: 0 Class::DBI::Plugin::RetrieveAll: 0 Template::Plugin::Class: 0 distribution_type: module generated_by: ExtUtils::MakeMaker version 6.17 Catalyst-Model-CDBI-CRUD-0.04/Changes000644 001750 001750 00000000737 10323451347 017643 0ustar00marcusmarcus000000 000000 Revision history for Perl extension Catalyst::Model::CDBI::CRUD. 0.04 2005-10-13 14:28:00 - Added deprecation warning to the POD. - Use match, not action. 0.03 2005-08-10 16:15:00 - process would not fetch primary keys that evals to false. 0.02 2005-04-15 15:54:00 - Updated examples for Catalyst 5 - Added Template::Plugin::Class to dependencies - Added POD docs, made sure they passed. 0.01 2005-01-28 22:00:00 - first release Catalyst-Model-CDBI-CRUD-0.04/MANIFEST000644 001750 001750 00000000376 10274145605 017502 0ustar00marcusmarcus000000 000000 Changes CRUD.pm Makefile.PL MANIFEST This list of files t/01use.t t/02pod.t t/03podcoverage.t templates/base/add templates/base/edit templates/base/list templates/base/view META.yml Module meta-data (added by MakeMaker) Catalyst-Model-CDBI-CRUD-0.04/CRUD.pm000644 001750 001750 00000005527 10323451311 017434 0ustar00marcusmarcus000000 000000 package Catalyst::Model::CDBI::CRUD; use strict; use base 'Catalyst::Model::CDBI'; use Class::DBI::AsForm; use Class::DBI::FromForm; use Class::DBI::Plugin::RetrieveAll; our $VERSION = '0.04'; =head1 NAME Catalyst::Model::CDBI::CRUD - CRUD CDBI Model Class =head1 SYNOPSIS # lib/MyApp/Model/CDBI.pm package MyApp::Model::CDBI; use base 'Catalyst::Model::CDBI::CRUD'; __PACKAGE__->config( dsn => 'dbi:SQLite2:/tmp/myapp.db', relationships => 1 ); 1; # lib/MyApp.pm package MyApp; use Catalyst 'FormValidator'; __PACKAGE__->config( name => 'My Application', root => '/home/joeuser/myapp/root' ); sub table : Global { my ( $self, $c ) = @_; $c->form( optional => [ MyApp::Model::CDBI::Table->columns ] ); #see Data::FormValidator $c->forward('MyApp::Model::CDBI::Table'); } sub end : Private { $c->forward('MyApp::V::TT'); } 1; =head1 DESCRIPTION This is a subclass of C with additional CRUD methods. Don't forget to copy the base templates to config->root! *NOTE* This module has been deprecated. See BUGS section below! =head2 METHODS =head3 add Does nothing by default. =cut sub add { } =head3 destroy Deletes a L object. =cut sub destroy { my ( $self, $c ) = @_; $c->stash->{item}->delete; $c->stash->{template} = 'list'; } =head3 do_add Creates a new L object from $c->form. =cut sub do_add { my ( $self, $c ) = @_; $self->create_from_form( $c->form ); $c->stash->{template} = 'list'; } =head3 do_edit Updates a L object from $c->form. =cut sub do_edit { my ( $self, $c ) = @_; $c->stash->{item}->update_from_form( $c->form ); $c->stash->{template} = 'edit'; } =head3 edit Does nothing by default. =cut sub edit { } =head3 list Does nothing by default. =cut sub list { } =head3 process Dispatches CRUD request to methods. =cut sub process { my $self = shift; my $c = shift; my $method = shift || 'list'; $c->stash->{item} = $self->retrieve( $_[0] ) if defined( $_[0] ); $c->stash->{template} = $method; $c->stash->{class} = ref $self || $self; $self->$method( $c, @_ ) if $self->can($method); } =head3 view Does nothing by default. =cut sub view { } =head1 BUGS This module is no longer supported by the Catalyst developers. We keep it indexed for the sake of existing users, but highly recommend new users to look at L =head1 SEE ALSO L, L =head1 AUTHOR Sebastian Riedel, C =head1 COPYRIGHT This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1; Catalyst-Model-CDBI-CRUD-0.04/Makefile.PL000644 001750 001750 00000001151 10274145605 020313 0ustar00marcusmarcus000000 000000 use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Catalyst::Model::CDBI::CRUD', AUTHOR => 'Sebastian Riedel (sri@oook.de)', PREREQ_PM => { Catalyst => '2.99', Catalyst::Model::CDBI => 0, Class::DBI => 0, Class::DBI::Loader => 0, Class::DBI::FromForm => 0, Class::DBI::AsForm => 0, Class::DBI::Plugin::RetrieveAll => 0, Catalyst::View::TT => 0, Template::Plugin::Class => 0 }, VERSION_FROM => 'CRUD.pm' );