Re: [CDBI] Obtain has_a Module Through find_column

[prev] [thread] [next] [Date index for 2005/11/08]

From: Peter Speltz
Subject: Re: [CDBI] Obtain has_a Module Through find_column
Date: 14:50 on 08 Nov 2005
Have you seen Class::DBI::FromCGI  or CGI::Untaint  (or
CGI::UntaintPatched  -- same but a little different behavior regarding
empty inputs) ?   While you are at it , check out Maypole
(maypole.perl.org) and Catalyst (catalyst.perl.org)  .   They are
frameworks  that use FromCGI / AsFrom type handling of forms.

Note check CDBI archives and rtcpan for bug  reports in FromCGI  if it
does not work good for you.


Also,  there is my hacked version of AsForm at www.cafes.net/peter
which adds more functionality (bool and enum select boxes, hidden=20
inputs  and a few more things.   Its all pretty rough but may help
you.


On 11/8/05, Jay Hargreaves <jay@xxxxxxx.xxx> wrote:
> Thanks Peter - much appreciated! This is gonna save me alot of time - or
> it would if I hadn't have already re-implemented it!?!
>
> Is there an easy way to check input with this method? Can I provide some
> instruction in my table module that will force a value to be verified
> using a specific function before the database is populated? I guess I'm
> looking for some kind of accessor/mutator? Specifically I want to verify
> that the value I pass into my URL database field is indeed a valid URL...
>
> Thanks again!
> Jay
>
> Peter Speltz wrote:
> > On 11/7/05, Jay Hargreaves <jay@xxxxxxx.xxx> wrote:
> >
> >>Hi everyone!
> >>
> >>I am looking to setup a generic form for creating database entries. I
> >>need to obtain information on a has_a relationship through the
> >>find_column method so I can populate a drop-down list with available
> >>values. My MyModule::Link table module contains the following line:
> >>
> >>__PACKAGE__->has_a(link_category_id =3D> 'MyModule::LinkCategory' );
> >>
> >
> >
> >
> > Check out Class::DBI::AsForm. It does that automatically for has_a colu=
mns.
> >
> >
> >
> > --
> > pjs
> >
>
> --
> bingo, bango, bosh...
>


--
pjs

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

[CDBI] Obtain has_a Module Through find_column
Jay Hargreaves 18:45 on 07 Nov 2005

Re: [CDBI] Obtain has_a Module Through find_column
Jay Hargreaves 10:02 on 08 Nov 2005

Re: [CDBI] Obtain has_a Module Through find_column
Peter Speltz 14:50 on 08 Nov 2005

Generated at 20:55 on 09 Nov 2005 by mariachi v0.52