Re: Removing auto-generated methods (set_sql)

[prev] [thread] [next] [Date index for 2004/06/14]

From: William McKee
Subject: Re: Removing auto-generated methods (set_sql)
Date: 16:57 on 14 Jun 2004
On Mon, Jun 14, 2004 at 05:33:21PM +0100, Tony Bowden wrote:
> > In testing my code, I discovered that repetitively calling the set_sql
> > function using the same name causes the following warning message:
> 
> Why are you calling it repetitively?

I thought that I may get this response. Perhaps you can point me to a
better way to do what I'm trying to achieve.

My script is being run in a mod_perl environment. I need to dynamically
generate a search based on input to a web form. This search requires a
join so I can't use standard CDBI methods. The WHERE clause could change
from call to call thus I regenerate it using SQL::Abstract.

Is there a way that I could generate the SQL once and set empty fields
to match anything? To my knowledge, that would only be possible using
LIKE and '%'. Any suggestions would be most appreciated.


> > Is there a problem with redefining a subroutine? If so, then
> > shouldn't there be a way to remove the created subs?
> 
> I'm not sure I follow. You don't remove the created one, you just don't
> create it in the first place. Why are you creating it multiple times?

See above. However, it seems like CDBI should allow a means to remove a
method if it is going to carp about redefining one. I don't see why I
shouldn't be able to redefine a set_sql statement.


Thanks,
William

        -- 
        Knowmad Services Inc.
http://www.knowmad.com

(message missing)

Removing auto-generated methods (set_sql)
William McKee 16:27 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
Tony Bowden 16:33 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
William McKee 16:57 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
Perrin Harkins 17:30 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
William McKee 20:51 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
Perrin Harkins 20:56 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
William McKee 21:48 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
Tony Bowden 21:59 on 14 Jun 2004

Re: Removing auto-generated methods (set_sql)
Tony Bowden 08:53 on 15 Jun 2004

Re: Removing auto-generated methods (set_sql)
William McKee 17:53 on 15 Jun 2004

Re: Removing auto-generated methods (set_sql)
Tony Bowden 19:59 on 15 Jun 2004

Re: Removing auto-generated methods (set_sql)
Perrin Harkins 00:04 on 16 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52