Re: DBIx::ContextualFetch trouble

[prev] [thread] [next] [Date index for 2004/12/27]

From: Tony Bowden
Subject: Re: DBIx::ContextualFetch trouble
Date: 11:07 on 27 Dec 2004
On Mon, Dec 27, 2004 at 12:37:43PM +0200, Gabor Szabo wrote:
> during the test phase of DBIx::ContextualFetch on 5.8.5
> (and now on 5.8.6 too) I get
> Use of uninitialized value in subroutine entry at
> DBIx-ContextualFetch-1.01/blib/lib/DBIx/ContextualFetch.pm line 51.

I still can't replicate this. What version of DBI are you running?

> The first thing I got stuck with is that I don't understand this sub
> in the test code:
> sub make_sth {
>   my $sql = shift;
>   (my $sth = $dbh->prepare($sql))->execute;
>   return $sth;
> }
> It does not pass anything to execute();
> but during the test cases some of the SQL strings passed to the
> sub contain placeholders (?). As it seems I get the above warning
> exactly in those cases when the query was prepared with a placeholder
> but no actual value was supplied to execute.

It seems that this is a classic case of premature abstraction. My guess
is that this was written before any of the test cases gave anything with
placeholders. Perhaps DBI has changed its behaviour at some stage if you
call execute() twice on the same $sth?

I've removed the ->execute from this function, and done that in-place in
the tests that need it.

1.02 is on its way to CPAN now.

If that doesn't help, I'll have to find some way to replicate the
problem.

Tony


(message missing)

DBIx::ContextualFetch trouble
Gabor Szabo 10:37 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Tony Bowden 11:07 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Gabor Szabo 11:31 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Gabor Szabo 13:50 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Tony Bowden 14:25 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Gabor Szabo 14:39 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Tony Bowden 14:42 on 27 Dec 2004

MySQL fulltext search
13:53 on 28 Dec 2004

Re: DBIx::ContextualFetch trouble
Gabor Szabo 14:54 on 27 Dec 2004

Re: DBIx::ContextualFetch trouble
Tony Bowden 15:57 on 27 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52