From a183ff6bda2ae98ef8f4a4f979647052e0020dea Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Wed, 8 Feb 2006 10:29:53 +0000 Subject: [PATCH] pod and pod-coverage tests now pass git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@458 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole.pm | 7 ++----- lib/Maypole/Model/CDBI.pm | 14 ++++++++++++++ lib/Maypole/Model/CDBI/AsForm.pm | 14 ++++++++++---- lib/Maypole/View/TT.pm | 4 ++++ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/Maypole.pm b/lib/Maypole.pm index c43de77..4633b1f 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -6,7 +6,6 @@ use warnings; use Maypole::Config; use Maypole::Constants; use Maypole::Headers; -use Maypole::Components; use URI(); use URI::QueryParam; use NEXT; @@ -468,11 +467,9 @@ sub handler : method { return $status; } -=back - -=head2 component +=item component - Run Maypole sub-requests as components using L + Run Maypole sub-requests as a component of the request [% request.component("/beer/view_as_component/20") %] diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index 2c79804..da6f162 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -142,6 +142,11 @@ sub _do_update_or_create { } +=head2 delete + +Deprecated method that calls do_delete or a given classes delete method, please +use do_delete instead + =head2 do_delete Unsuprisingly, this command causes a database record to be forever lost. @@ -167,6 +172,9 @@ sub do_delete { $self->list($r); } +=head2 search + +Deprecated searching method - use do_search instead. =head2 do_search @@ -583,6 +591,12 @@ sub class_of { return $r->config->loader->_table2class($table); # why not find_class ? } +=head2 fetch_objects + +Returns 1 or more objects of the given class when provided with the request + +=cut + sub fetch_objects { my ($class, $r)=@_; my @pcs = $class->primary_columns; diff --git a/lib/Maypole/Model/CDBI/AsForm.pm b/lib/Maypole/Model/CDBI/AsForm.pm index e0cd7f2..023f88d 100644 --- a/lib/Maypole/Model/CDBI/AsForm.pm +++ b/lib/Maypole/Model/CDBI/AsForm.pm @@ -53,7 +53,7 @@ Maypole::Model:CDBI::AsForm - Produce HTML form elements for database columns __PACKAGE__->has_a('beer', 'BeerDB::Beer'); package BeerDB::Drinker; __PACKAGE__->has_many('pints', 'BeerDB::Pint'); - + # NEED to do mapping my $sel = BeerDB::Drinker->to_field('pints', 'select') # multiple my $sel = $Drunk->to_field('pints', 'select'); # Already had beers selected @@ -90,8 +90,7 @@ __PACKAGE__->has_many('contacts' => 'Contact', - # Random uses - + # Random uses =head1 DESCRIPTION @@ -117,7 +116,8 @@ Uses fields specified in search_fields, makes foreign inputs if necessary. =cut -# TODO -- use search_columns +# TODO -- use search_columns + sub search_inputs { my ($class, $r) = @_; warn "In model search_inputs " if $class->model_debug; @@ -169,6 +169,12 @@ sub unselect_element { } +=head2 a_select_box + + Returns a HTML::Element representing a select box, based on the arguments + +=cut + # make a select box from args sub a_select_box { my ($self, $name, $vals, $selected_val, $contents) = @_; diff --git a/lib/Maypole/View/TT.pm b/lib/Maypole/View/TT.pm index b837e52..7a2ab03 100644 --- a/lib/Maypole/View/TT.pm +++ b/lib/Maypole/View/TT.pm @@ -102,6 +102,10 @@ options. Processes the template and sets the output. See L +=item report_error + +Reports the details of an error, current state and parameters + =back =head1 TEMPLATE TOOLKIT INTRODUCTION -- 2.39.2