Re: [Maypole] Re: create_from_cgi question

From: Tony Bowden (tony-maypole at kasei.com)
Date: Thu Nov 04 2004 - 12:18:45 GMT


On Wed, Nov 03, 2004 at 05:39:30PM -0800, Peter Speltz wrote:
> So, the ideal solution would be to add an additional field to the
> create_from_cgi which would allow you to use it like this:
> my $customer = Customer->create_from_cgi( $h => { additional => {user_id => $session->usr_id} } );

> Then you get the power of FromCGI with the freedom of CDBI::create. The docs
> would change like so:
> $film->update_from_cgi($h => {
> all => \@all_columns, # auto-filled if left blank
> ignore => \@cols_to_ignore,
> required => \@cols_needed,
> additional => \%cols_and_values_not_in_form
> });

I tend to do that by adding those values into what will become $h in
your example, before ever calling update_from_cgi with it...

Tony

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT