On Tue, Nov 02, 2004 at 03:41:49PM -0500, Marc M. Adkins wrote: > On Sunday 31 October 2004 10:06 am, Tim Bunce wrote: > > On Sat, Oct 30, 2004 at 10:23:46AM -0400, Marc M. Adkins wrote: > > > On Thursday 14 October 2004 05:20 am, Tim Bunce wrote: > > > > On Wed, Oct 13, 2004 at 04:33:14PM -0400, Marc M. Adkins wrote: > > > > > I have been getting an annoying warning about dereferencing an > > > > > unreferenced scalar. > > > > > > > > > > Here's the punch line: it doesn't happen unless I use > > > > > fetchall_hashref(). > > > > > > > > It's fixed in the (as yet unannounced) DBI 1.45 release. > > > > In fact I'll go make the announcement now... > > > > > > After some false starts I've finally gotten DBI 1.45 from the ActiveState > > > PPM repository. I'm still having the same thing happen (I can send my > > > test program again if necessary). I tried two separate W2K systems. It > > > only shows up using File::Copy after fetchall_hashref(). Weird. > > > > Very. Can you trim your test script down further? Then try other drivers? > > (To isolate if it's a DBI or DBD::ODBC issue.) > > The test script is as trim as it gets. > What I've posted is as simple as I could make it.
I'm sure there's more room for making it smaller, but the first priority is making it reproducable by someone else, preferably me :) I've attached a slightly smaller version. Could be made smaller still by removing File::Spec (most windows APIs work fine with unix style forward slashes). And File::Path could be dropped. Be aggressive about removing absolutely everything you can. > It requires the combination of File::Copy and fetchall_hashref(). Hey, the > problem may not be in DBI. But I can't duplicate it without both. Believe > me, I spent some time on this before posting. Thanks. > I tried it on Linux w/mySQL. That's the only other combination to which I > have easy access. I was unable to duplicate the behavior. Nor me. I tried using mysql plus perl 5.6.1 (no threads) or 5.8.3 (with threads). Your test script is not self-contained. Other people can't run it without having to more than just alter the DSN. I suggest making it both as small as possible and more self-contained: have it generate the data & files itself. Does there need to be a loop around the copy() or is a single copy() enough? Etc etc. Adding a print "DBI $DBI::VERSION\n" would also be a good idea. Also, if possible, please try with some earlier versions of the DBI. Tim.
