On Sat, Feb 15, 2003 at 10:51:14AM +1100, Craig Sanders wrote: > On Fri, Feb 14, 2003 at 11:05:19AM +0000, Tim Bunce wrote: > > Can you post an example script that calls selectrow_hashref and > > demonstrates the problem? > > the application is written in HTML::Mason, so all the stuff for opening
this is actually significant. i just made a standalone perl script which does exactly the same thing as the example i posted (i won't include it here because the only difference is that it has the login & password details for the postgres database). the standalone version works OK (in that it doesn't die). for non-existent record id 100 (which causes the HTML::Mason version to die), the output is: Use of uninitialized value in concatenation (.) or string at ./test2.pl line 26 (#1) QR: '' at ./test2.pl line 26. QR->login: '' Use of uninitialized value in concatenation (.) or string at ./test2.pl line 28 (#1) QR->name : '' Use of uninitialized value in concatenation (.) or string at ./test2.pl line 29 (#1) QR->url : '' Use of uninitialized value in concatenation (.) or string at ./test2.pl line 30 (#1) QR->desc : '' so, it looks like in plain perl selectrow_hashref returns undef when the record doesn't exist, but in HTML::Mason it returns the scalar '1'. perl is 5.8.0 mason is 1.17 dbi is 1.32 postgres is 7.3.1 craig -- craig sanders <[EMAIL PROTECTED]> Fabricati Diem, PVNC. -- motto of the Ankh-Morpork City Watch