[31691] in Perl-Users-Digest
Perl-Users Digest, Issue: 2954 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 19 21:14:20 2010
Date: Wed, 19 May 2010 18:14:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 19 May 2010 Volume: 11 Number: 2954
Today's topics:
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. sln@netherlands.com
Re: Debugging question: tracing the origin of an error. <ben@morrow.me.uk>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: Debugging question: tracing the origin of an error. <r.ted.byers@gmail.com>
Re: FAQ 5.38 Why does Perl let me delete read-only file sln@netherlands.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 May 2010 13:51:16 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <dddc89dc-b8c2-441c-8d75-1301aeafa323@v18g2000vbc.googlegroups.com>
On May 13, 5:56=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
> On May 13, 11:56=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
>
>
> > On May 13, 2:03=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
> > > On May 13, 10:10=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > > I have done all the usual things (as specified in the FAQ), and mor=
e,
> > > > but it isn't enough.
>
> > > > Here is how my script starts:
>
> > > > use strict;
> > > > use warnings;
> > > > use DBI;
> > > > use DateTime::Format::MySQL;
> > > > use Date::Manip;
> > > > use DateTime::Format::DateManip;
>
> > > > BEGIN {
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__WARN__} =3D sub{ print STDERR "Perl:=
", @_; };
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__DIE__} =A0=3D sub{ print STDERR "Per=
l: ", @_; exit 1};
>
> > > > }
>
> > > > $| =3D 1;
>
> > > > In the body of the script, this script does very little except make=
a
> > > > DB connection, place the values from the record set that results fr=
om
> > > > a trivial select query into a variable, and then prints it. =A0Then=
all
> > > > handles are closed and the progrma ends. =A0The error actually aris=
es
> > > > after the last statement (and does not appear in ANY of my other
> > > > scripts that use the packes listed above).
>
> > > > Here is the error statement I get:
>
> > > > Perl: Can't call method "FETCH" on an undefined value at C:/Perl/si=
te/
> > > > lib/Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > > > destruction.
>
> > > > At no time have I made direct use of the file mentioned, so it must=
be
> > > > something one of the above packages has done. =A0However, there is =
no
> > > > information provided as to what happened that led to this error. =
=A0It
> > > > does not even say what object is being destructed or what package
> > > > created, or failed to create, it.
>
> > > > How can I modify the signal handling I set up above so that I can g=
et
> > > > this information?
>
> > > Here's an purported cure:
>
> > > =A0 =A0END { $^W =3D 0; }
>
> > Alas, the purported cure "END { $^W =3D 0; }" doesn't work in this
> > instance (unless I used it incorrectly). =A0In any event, do you know
> > how that purported cure is supposed to work?
>
> I thought I recalled seeing the error/cure once before.
> But, here's a thread that suggests just wrapping the
> disconnect. Their error output is virtually the same:
>
> { $^W =3D 0; $dbh->disconnect }
>
> =A0 perl case.pl
> =A0 =A0 =A0 =A0 =A0DBI::db=3DHASH(0x8f68e40) trace level set to 9 in
> =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0 =A0 =A0 <- DESTROY=3D undef at unknown location!
> =A0 =A0 =A0 =A0 =A0 (in cleanup) Can't call method "FETCH" on an
> =A0 =A0 =A0 =A0 =A0 =A0undefined value at
> =A0 =A0 =A0 =A0 =A0 =A0 C:/opt/perl/site/lib/Win32/TieRegistry.pm
> =A0 =A0 =A0 =A0 =A0 =A0 line 1486 during global destruction.
>
>
>
>
>
> > I am using ActiveSate's perl (v5.10.0) on Windows, and have examined
> > each of the tools I thought might have something useful, but either
> > they didn't have something that would answer my question or I didn't
> > understand the documentation.
>
> > Almost a decade ago, I wrote a C++ template class that I used to wrap
> > all exception classes and, using RTTI, I made exceptions traceable,
> > including not only the line and file of the source code where the
> > exception arose but also the class affected and all functions applied
> > to it from the time an instance of the class was created to the time
> > the exception was produced; and this in addition to a simple call
> > stack. =A0This proved priceless in debugging my own code (and
> > identifying cases where I was hit by a bug in one or another of the
> > libraries I used, so I could focus on finding a work-around rather
> > than seeking a bug that didn't exist in my code). =A0But, it was =A0use=
ful
> > only when I could compile it into my code which normally meant my own
> > code only. =A0Alas, it relied on compiler specific macros in addition t=
o
> > a couple of my own, and the language has changed since I did that.
>
> > Anyway, in addition to making this specific error go away, what I
> > really need is something I can include at the top of my script and
> > have it produce info about any object the script makes (whether
> > explicitly or indirectly as part of the internals of a package that
> > had been included), and what happens to it, but prints this info only
> > if that object is involved in an error: basically a perl equivalent of
> > the traceable exceptions I'd made in C++ so very long ago. =A0
> > ...
>
> If this new cure doesn't work, you might try one of DBI's
> higher trace settings too as they demo in the thread.
>
> --
> Charles DeRykus
OK, Combining Steve's suggestion (with teh suggested ammendment
regarding '&;), with yours, at trace level 10, I get the following
output AFTER all my source code has been executed correctly:
>> DESTROY DISPATCH (DBI::st=3DHASH(0x242e39c) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::st=3DHASH(0x242e39c)) ignored for outer handle
(inner DBI::st=3DHASH(0x2e48dcc) has ref cnt 1)
>> DESTROY DISPATCH (DBI::st=3DHASH(0x2e48dcc) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e48dcc)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (sth 0x2e48dcc, com 0x24459b4, imp
DBD::mysql::st):
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=3DHASH(0x242e7ec)
KIDS 0 (0 Active)
NUM_OF_FIELDS 5
NUM_OF_PARAMS 0
dbih_clearcom 0x2e48dcc (com 0x24459b4, type 3) done.
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e6ac) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::db=3DHASH(0x242e6ac)) ignored for outer handle
(inner DBI::db=3DHASH(0x242e7ec) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e7ec) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x242e7ec)~INNER)
thr#3424c
imp_dbh->pmysql: 242864c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (dbh 0x242e7ec, com 0x245a44c, imp
DBD::mysql::db):
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=3DHASH(0x242ec9c)
KIDS 0 (0 Active)
IMP_DATA HASH(0x242e78c)
dbih_clearcom 0x242e7ec (com 0x245a44c, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/3 @1 g0
ima801 pid#18652) at C:/Perl/site/lib/DBI.pm line 731 via at k:/
Projects/NewRiskModel/Simple.Risk.Model.pl line 0
-> disconnect_all for DBD::mysql::dr
(DBI::dr=3DHASH(0x24066d4)~0x242ec9c) thr#3424c
<- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
line 731 via at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! <> DESTROY(DBI::dr=3DHASH(0x24066d4)) ignored for outer handle
(inner DBI::dr=3DHASH(0x242ec9c) has ref cnt 1)
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x242ec9c) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x242ec9c)~INNER) thr#3424c
! <- DESTROY=3D undef during global destruction
DESTROY (dbih_clearcom) (drh 0x242ec9c, com 0x23f95d4, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x242ec9c (com 0x23f95d4, type 1) done.
Trace:
k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
(eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
destruction.
Compilation finished at Wed May 19 16:41:23
Correct me if I am wrong, it looks like DBI is disconnecting/
destroying children recursively up through their parents, until
everything is destroyed, and then the error happens. It still isn't
clear what object it is trying to call fetch on. I will continue
trying with still higher trace levels, but I am baffled why this hits
here but not in my other scripts that use DBI. It doesn't seem to
matter if I call $dbh->disconnect(), though my inclination is to call
it once I have all the data I need to process.
Any other ideas about why this happens and how best to address it?
Thanks
Ted
------------------------------
Date: Wed, 19 May 2010 13:51:32 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <5a437ab1-148d-46f4-95f3-b074da87df70@c13g2000vbr.googlegroups.com>
On May 13, 5:56=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
> On May 13, 11:56=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
>
>
> > On May 13, 2:03=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
> > > On May 13, 10:10=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > > I have done all the usual things (as specified in the FAQ), and mor=
e,
> > > > but it isn't enough.
>
> > > > Here is how my script starts:
>
> > > > use strict;
> > > > use warnings;
> > > > use DBI;
> > > > use DateTime::Format::MySQL;
> > > > use Date::Manip;
> > > > use DateTime::Format::DateManip;
>
> > > > BEGIN {
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__WARN__} =3D sub{ print STDERR "Perl:=
", @_; };
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__DIE__} =A0=3D sub{ print STDERR "Per=
l: ", @_; exit 1};
>
> > > > }
>
> > > > $| =3D 1;
>
> > > > In the body of the script, this script does very little except make=
a
> > > > DB connection, place the values from the record set that results fr=
om
> > > > a trivial select query into a variable, and then prints it. =A0Then=
all
> > > > handles are closed and the progrma ends. =A0The error actually aris=
es
> > > > after the last statement (and does not appear in ANY of my other
> > > > scripts that use the packes listed above).
>
> > > > Here is the error statement I get:
>
> > > > Perl: Can't call method "FETCH" on an undefined value at C:/Perl/si=
te/
> > > > lib/Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > > > destruction.
>
> > > > At no time have I made direct use of the file mentioned, so it must=
be
> > > > something one of the above packages has done. =A0However, there is =
no
> > > > information provided as to what happened that led to this error. =
=A0It
> > > > does not even say what object is being destructed or what package
> > > > created, or failed to create, it.
>
> > > > How can I modify the signal handling I set up above so that I can g=
et
> > > > this information?
>
> > > Here's an purported cure:
>
> > > =A0 =A0END { $^W =3D 0; }
>
> > Alas, the purported cure "END { $^W =3D 0; }" doesn't work in this
> > instance (unless I used it incorrectly). =A0In any event, do you know
> > how that purported cure is supposed to work?
>
> I thought I recalled seeing the error/cure once before.
> But, here's a thread that suggests just wrapping the
> disconnect. Their error output is virtually the same:
>
> { $^W =3D 0; $dbh->disconnect }
>
> =A0 perl case.pl
> =A0 =A0 =A0 =A0 =A0DBI::db=3DHASH(0x8f68e40) trace level set to 9 in
> =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0 =A0 =A0 <- DESTROY=3D undef at unknown location!
> =A0 =A0 =A0 =A0 =A0 (in cleanup) Can't call method "FETCH" on an
> =A0 =A0 =A0 =A0 =A0 =A0undefined value at
> =A0 =A0 =A0 =A0 =A0 =A0 C:/opt/perl/site/lib/Win32/TieRegistry.pm
> =A0 =A0 =A0 =A0 =A0 =A0 line 1486 during global destruction.
>
>
>
>
>
> > I am using ActiveSate's perl (v5.10.0) on Windows, and have examined
> > each of the tools I thought might have something useful, but either
> > they didn't have something that would answer my question or I didn't
> > understand the documentation.
>
> > Almost a decade ago, I wrote a C++ template class that I used to wrap
> > all exception classes and, using RTTI, I made exceptions traceable,
> > including not only the line and file of the source code where the
> > exception arose but also the class affected and all functions applied
> > to it from the time an instance of the class was created to the time
> > the exception was produced; and this in addition to a simple call
> > stack. =A0This proved priceless in debugging my own code (and
> > identifying cases where I was hit by a bug in one or another of the
> > libraries I used, so I could focus on finding a work-around rather
> > than seeking a bug that didn't exist in my code). =A0But, it was =A0use=
ful
> > only when I could compile it into my code which normally meant my own
> > code only. =A0Alas, it relied on compiler specific macros in addition t=
o
> > a couple of my own, and the language has changed since I did that.
>
> > Anyway, in addition to making this specific error go away, what I
> > really need is something I can include at the top of my script and
> > have it produce info about any object the script makes (whether
> > explicitly or indirectly as part of the internals of a package that
> > had been included), and what happens to it, but prints this info only
> > if that object is involved in an error: basically a perl equivalent of
> > the traceable exceptions I'd made in C++ so very long ago. =A0
> > ...
>
> If this new cure doesn't work, you might try one of DBI's
> higher trace settings too as they demo in the thread.
>
> --
> Charles DeRykus
OK, Combining Steve's suggestion (with teh suggested ammendment
regarding '&;), with yours, at trace level 10, I get the following
output AFTER all my source code has been executed correctly:
>> DESTROY DISPATCH (DBI::st=3DHASH(0x242e39c) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::st=3DHASH(0x242e39c)) ignored for outer handle
(inner DBI::st=3DHASH(0x2e48dcc) has ref cnt 1)
>> DESTROY DISPATCH (DBI::st=3DHASH(0x2e48dcc) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e48dcc)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (sth 0x2e48dcc, com 0x24459b4, imp
DBD::mysql::st):
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=3DHASH(0x242e7ec)
KIDS 0 (0 Active)
NUM_OF_FIELDS 5
NUM_OF_PARAMS 0
dbih_clearcom 0x2e48dcc (com 0x24459b4, type 3) done.
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e6ac) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::db=3DHASH(0x242e6ac)) ignored for outer handle
(inner DBI::db=3DHASH(0x242e7ec) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e7ec) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x242e7ec)~INNER)
thr#3424c
imp_dbh->pmysql: 242864c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (dbh 0x242e7ec, com 0x245a44c, imp
DBD::mysql::db):
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=3DHASH(0x242ec9c)
KIDS 0 (0 Active)
IMP_DATA HASH(0x242e78c)
dbih_clearcom 0x242e7ec (com 0x245a44c, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/3 @1 g0
ima801 pid#18652) at C:/Perl/site/lib/DBI.pm line 731 via at k:/
Projects/NewRiskModel/Simple.Risk.Model.pl line 0
-> disconnect_all for DBD::mysql::dr
(DBI::dr=3DHASH(0x24066d4)~0x242ec9c) thr#3424c
<- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
line 731 via at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! <> DESTROY(DBI::dr=3DHASH(0x24066d4)) ignored for outer handle
(inner DBI::dr=3DHASH(0x242ec9c) has ref cnt 1)
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x242ec9c) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x242ec9c)~INNER) thr#3424c
! <- DESTROY=3D undef during global destruction
DESTROY (dbih_clearcom) (drh 0x242ec9c, com 0x23f95d4, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x242ec9c (com 0x23f95d4, type 1) done.
Trace:
k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
(eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
destruction.
Compilation finished at Wed May 19 16:41:23
Correct me if I am wrong, it looks like DBI is disconnecting/
destroying children recursively up through their parents, until
everything is destroyed, and then the error happens. It still isn't
clear what object it is trying to call fetch on. I will continue
trying with still higher trace levels, but I am baffled why this hits
here but not in my other scripts that use DBI. It doesn't seem to
matter if I call $dbh->disconnect(), though my inclination is to call
it once I have all the data I need to process.
Any other ideas about why this happens and how best to address it?
Thanks
Ted
------------------------------
Date: Wed, 19 May 2010 14:46:43 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <e4323cb8-1f12-4828-8fb2-fe1ae83d2bc7@w3g2000vbd.googlegroups.com>
On May 13, 5:56=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
> On May 13, 11:56=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
>
>
> > On May 13, 2:03=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
> > > On May 13, 10:10=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > > I have done all the usual things (as specified in the FAQ), and mor=
e,
> > > > but it isn't enough.
>
> > > > Here is how my script starts:
>
> > > > use strict;
> > > > use warnings;
> > > > use DBI;
> > > > use DateTime::Format::MySQL;
> > > > use Date::Manip;
> > > > use DateTime::Format::DateManip;
>
> > > > BEGIN {
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__WARN__} =3D sub{ print STDERR "Perl:=
", @_; };
> > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__DIE__} =A0=3D sub{ print STDERR "Per=
l: ", @_; exit 1};
>
> > > > }
>
> > > > $| =3D 1;
>
> > > > In the body of the script, this script does very little except make=
a
> > > > DB connection, place the values from the record set that results fr=
om
> > > > a trivial select query into a variable, and then prints it. =A0Then=
all
> > > > handles are closed and the progrma ends. =A0The error actually aris=
es
> > > > after the last statement (and does not appear in ANY of my other
> > > > scripts that use the packes listed above).
>
> > > > Here is the error statement I get:
>
> > > > Perl: Can't call method "FETCH" on an undefined value at C:/Perl/si=
te/
> > > > lib/Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > > > destruction.
>
> > > > At no time have I made direct use of the file mentioned, so it must=
be
> > > > something one of the above packages has done. =A0However, there is =
no
> > > > information provided as to what happened that led to this error. =
=A0It
> > > > does not even say what object is being destructed or what package
> > > > created, or failed to create, it.
>
> > > > How can I modify the signal handling I set up above so that I can g=
et
> > > > this information?
>
> > > Here's an purported cure:
>
> > > =A0 =A0END { $^W =3D 0; }
>
> > Alas, the purported cure "END { $^W =3D 0; }" doesn't work in this
> > instance (unless I used it incorrectly). =A0In any event, do you know
> > how that purported cure is supposed to work?
>
> I thought I recalled seeing the error/cure once before.
> But, here's a thread that suggests just wrapping the
> disconnect. Their error output is virtually the same:
>
> { $^W =3D 0; $dbh->disconnect }
>
> =A0 perl case.pl
> =A0 =A0 =A0 =A0 =A0DBI::db=3DHASH(0x8f68e40) trace level set to 9 in
> =A0 =A0 =A0 =A0 =A0...
> =A0 =A0 =A0 =A0 =A0 <- DESTROY=3D undef at unknown location!
> =A0 =A0 =A0 =A0 =A0 (in cleanup) Can't call method "FETCH" on an
> =A0 =A0 =A0 =A0 =A0 =A0undefined value at
> =A0 =A0 =A0 =A0 =A0 =A0 C:/opt/perl/site/lib/Win32/TieRegistry.pm
> =A0 =A0 =A0 =A0 =A0 =A0 line 1486 during global destruction.
>
>
>
>
>
> > I am using ActiveSate's perl (v5.10.0) on Windows, and have examined
> > each of the tools I thought might have something useful, but either
> > they didn't have something that would answer my question or I didn't
> > understand the documentation.
>
> > Almost a decade ago, I wrote a C++ template class that I used to wrap
> > all exception classes and, using RTTI, I made exceptions traceable,
> > including not only the line and file of the source code where the
> > exception arose but also the class affected and all functions applied
> > to it from the time an instance of the class was created to the time
> > the exception was produced; and this in addition to a simple call
> > stack. =A0This proved priceless in debugging my own code (and
> > identifying cases where I was hit by a bug in one or another of the
> > libraries I used, so I could focus on finding a work-around rather
> > than seeking a bug that didn't exist in my code). =A0But, it was =A0use=
ful
> > only when I could compile it into my code which normally meant my own
> > code only. =A0Alas, it relied on compiler specific macros in addition t=
o
> > a couple of my own, and the language has changed since I did that.
>
> > Anyway, in addition to making this specific error go away, what I
> > really need is something I can include at the top of my script and
> > have it produce info about any object the script makes (whether
> > explicitly or indirectly as part of the internals of a package that
> > had been included), and what happens to it, but prints this info only
> > if that object is involved in an error: basically a perl equivalent of
> > the traceable exceptions I'd made in C++ so very long ago. =A0
> > ...
>
> If this new cure doesn't work, you might try one of DBI's
> higher trace settings too as they demo in the thread.
>
> --
> Charles DeRykus
OK, Combining Steve's suggestion (with teh suggested ammendment
regarding '&;), with yours, at trace level 10, I get the following
output AFTER all my source code has been executed correctly:
>> DESTROY DISPATCH (DBI::st=3DHASH(0x242e39c) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::st=3DHASH(0x242e39c)) ignored for outer handle
(inner DBI::st=3DHASH(0x2e48dcc) has ref cnt 1)
>> DESTROY DISPATCH (DBI::st=3DHASH(0x2e48dcc) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e48dcc)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (sth 0x2e48dcc, com 0x24459b4, imp
DBD::mysql::st):
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=3DHASH(0x242e7ec)
KIDS 0 (0 Active)
NUM_OF_FIELDS 5
NUM_OF_PARAMS 0
dbih_clearcom 0x2e48dcc (com 0x24459b4, type 3) done.
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e6ac) rc1/1 @1 g0
ima10004 pid#18652)
<> DESTROY(DBI::db=3DHASH(0x242e6ac)) ignored for outer handle
(inner DBI::db=3DHASH(0x242e7ec) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=3DHASH(0x242e7ec) rc1/1 @1 g0
ima10004 pid#18652)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x242e7ec)~INNER)
thr#3424c
imp_dbh->pmysql: 242864c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (dbh 0x242e7ec, com 0x245a44c, imp
DBD::mysql::db):
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=3DHASH(0x242ec9c)
KIDS 0 (0 Active)
IMP_DATA HASH(0x242e78c)
dbih_clearcom 0x242e7ec (com 0x245a44c, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/3 @1 g0
ima801 pid#18652) at C:/Perl/site/lib/DBI.pm line 731 via at k:/
Projects/NewRiskModel/Simple.Risk.Model.pl line 0
-> disconnect_all for DBD::mysql::dr
(DBI::dr=3DHASH(0x24066d4)~0x242ec9c) thr#3424c
<- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
line 731 via at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! <> DESTROY(DBI::dr=3DHASH(0x24066d4)) ignored for outer handle
(inner DBI::dr=3DHASH(0x242ec9c) has ref cnt 1)
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x242ec9c) rc1/1 @1 g0
ima10004 pid#18652) during global destruction
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x242ec9c)~INNER) thr#3424c
! <- DESTROY=3D undef during global destruction
DESTROY (dbih_clearcom) (drh 0x242ec9c, com 0x23f95d4, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x242ec9c (com 0x23f95d4, type 1) done.
Trace:
k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
(eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
destruction.
Compilation finished at Wed May 19 16:41:23
Correct me if I am wrong, it looks like DBI is disconnecting/
destroying children recursively up through their parents, until
everything is destroyed, and then the error happens. It still isn't
clear what object it is trying to call fetch on. I will continue
trying with still higher trace levels, but I am baffled why this hits
here but not in my other scripts that use DBI. It doesn't seem to
matter if I call $dbh->disconnect(), though my inclination is to call
it once I have all the data I need to process.
Any other ideas about why this happens and how best to address it?
Thanks
Ted
------------------------------
Date: Wed, 19 May 2010 15:04:09 -0700
From: sln@netherlands.com
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <k0o8v5tbgc9ddj0bvmsb2splk88t3nct20@4ax.com>
On Wed, 19 May 2010 14:46:43 -0700 (PDT), Ted Byers <r.ted.byers@gmail.com> wrote:
>On May 13, 5:56 pm, "C.DeRykus" <dery...@gmail.com> wrote:
>> On May 13, 11:56 am, Ted Byers <r.ted.by...@gmail.com> wrote:
>>
>Correct me if I am wrong, it looks like DBI is disconnecting/
>destroying children recursively up through their parents, until
>everything is destroyed, and then the error happens. It still isn't
>clear what object it is trying to call fetch on. I will continue
>trying with still higher trace levels, but I am baffled why this hits
>here but not in my other scripts that use DBI. It doesn't seem to
>matter if I call $dbh->disconnect(), though my inclination is to call
>it once I have all the data I need to process.
>
>Any other ideas about why this happens and how best to address it?
>
No but, your googlegroups.com is tripple posting this to usenet.
-sln
------------------------------
Date: Wed, 19 May 2010 23:54:27 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <3q6ec7-6f8.ln1@osiris.mauzo.dyndns.org>
Quoth Ted Byers <r.ted.byers@gmail.com>:
>
> Trace:
> k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
> NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
> Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
> (eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
>
> Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
> Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> destruction.
>
> Compilation finished at Wed May 19 16:41:23
Am I correct that line 1485 of your copy of Win32/TieRegistry.pm is the
last line here?
sub DESTROY
{
my $self= shift(@_);
return if tied(%$self);
my $unload;
eval { $unload= $self->{UNLOADME}; 1 }
If so I can't see how that could be calling tie magic, since the code's
just checked that it *isn't* tied. In any case, back up your copy of
Win32/TieRegistry.pm and add
use Devel::Peek ();
use Carp ();
Devel::Peek::Dump($self);
Carp::confess("huh?");
just before that line, and post the result.
Ben
------------------------------
Date: Wed, 19 May 2010 17:40:48 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <437023a5-bf5e-491f-a2f5-dc5e5ffd4787@j9g2000vbp.googlegroups.com>
On May 19, 5:46=A0pm, Ted Byers <r.ted.by...@gmail.com> wrote:
> On May 13, 5:56=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
>
>
> > On May 13, 11:56=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > On May 13, 2:03=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
> > > > On May 13, 10:10=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > > > I have done all the usual things (as specified in the FAQ), and m=
ore,
> > > > > but it isn't enough.
>
> > > > > Here is how my script starts:
>
> > > > > use strict;
> > > > > use warnings;
> > > > > use DBI;
> > > > > use DateTime::Format::MySQL;
> > > > > use Date::Manip;
> > > > > use DateTime::Format::DateManip;
>
> > > > > BEGIN {
> > > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__WARN__} =3D sub{ print STDERR "Per=
l: ", @_; };
> > > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__DIE__} =A0=3D sub{ print STDERR "P=
erl: ", @_; exit 1};
>
> > > > > }
>
> > > > > $| =3D 1;
>
> > > > > In the body of the script, this script does very little except ma=
ke a
> > > > > DB connection, place the values from the record set that results =
from
> > > > > a trivial select query into a variable, and then prints it. =A0Th=
en all
> > > > > handles are closed and the progrma ends. =A0The error actually ar=
ises
> > > > > after the last statement (and does not appear in ANY of my other
> > > > > scripts that use the packes listed above).
>
> > > > > Here is the error statement I get:
>
> > > > > Perl: Can't call method "FETCH" on an undefined value at C:/Perl/=
site/
> > > > > lib/Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > > > > destruction.
>
> > > > > At no time have I made direct use of the file mentioned, so it mu=
st be
> > > > > something one of the above packages has done. =A0However, there i=
s no
> > > > > information provided as to what happened that led to this error. =
=A0It
> > > > > does not even say what object is being destructed or what package
> > > > > created, or failed to create, it.
>
> > > > > How can I modify the signal handling I set up above so that I can=
get
> > > > > this information?
>
> > > > Here's an purported cure:
>
> > > > =A0 =A0END { $^W =3D 0; }
>
> > > Alas, the purported cure "END { $^W =3D 0; }" doesn't work in this
> > > instance (unless I used it incorrectly). =A0In any event, do you know
> > > how that purported cure is supposed to work?
>
> > I thought I recalled seeing the error/cure once before.
> > But, here's a thread that suggests just wrapping the
> > disconnect. Their error output is virtually the same:
>
> > { $^W =3D 0; $dbh->disconnect }
>
> > =A0 perl case.pl
> > =A0 =A0 =A0 =A0 =A0DBI::db=3DHASH(0x8f68e40) trace level set to 9 in
> > =A0 =A0 =A0 =A0 =A0...
> > =A0 =A0 =A0 =A0 =A0 <- DESTROY=3D undef at unknown location!
> > =A0 =A0 =A0 =A0 =A0 (in cleanup) Can't call method "FETCH" on an
> > =A0 =A0 =A0 =A0 =A0 =A0undefined value at
> > =A0 =A0 =A0 =A0 =A0 =A0 C:/opt/perl/site/lib/Win32/TieRegistry.pm
> > =A0 =A0 =A0 =A0 =A0 =A0 line 1486 during global destruction.
>
> > > I am using ActiveSate's perl (v5.10.0) on Windows, and have examined
> > > each of the tools I thought might have something useful, but either
> > > they didn't have something that would answer my question or I didn't
> > > understand the documentation.
>
> > > Almost a decade ago, I wrote a C++ template class that I used to wrap
> > > all exception classes and, using RTTI, I made exceptions traceable,
> > > including not only the line and file of the source code where the
> > > exception arose but also the class affected and all functions applied
> > > to it from the time an instance of the class was created to the time
> > > the exception was produced; and this in addition to a simple call
> > > stack. =A0This proved priceless in debugging my own code (and
> > > identifying cases where I was hit by a bug in one or another of the
> > > libraries I used, so I could focus on finding a work-around rather
> > > than seeking a bug that didn't exist in my code). =A0But, it was =A0u=
seful
> > > only when I could compile it into my code which normally meant my own
> > > code only. =A0Alas, it relied on compiler specific macros in addition=
to
> > > a couple of my own, and the language has changed since I did that.
>
> > > Anyway, in addition to making this specific error go away, what I
> > > really need is something I can include at the top of my script and
> > > have it produce info about any object the script makes (whether
> > > explicitly or indirectly as part of the internals of a package that
> > > had been included), and what happens to it, but prints this info only
> > > if that object is involved in an error: basically a perl equivalent o=
f
> > > the traceable exceptions I'd made in C++ so very long ago. =A0
> > > ...
>
> > If this new cure doesn't work, you might try one of DBI's
> > higher trace settings too as they demo in the thread.
>
> > --
> > Charles DeRykus
>
> OK, Combining Steve's suggestion (with teh suggested ammendment
> regarding '&;), with yours, at trace level 10, I get the following
> output AFTER all my source code has been executed correctly:
>
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::st=3DHASH(0x242e39c) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 <> DESTROY(DBI::st=3DHASH(0x242e39c)) ignored for outer handle
> (inner DBI::st=3DHASH(0x2e48dcc) has ref cnt 1)
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::st=3DHASH(0x2e48dcc) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 -> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e48dcc)~INNER)
> thr#3424c
> =A0 =A0 <- DESTROY=3D undef
> =A0 =A0 DESTROY (dbih_clearcom) (sth 0x2e48dcc, com 0x24459b4, imp
> DBD::mysql::st):
> =A0 =A0 =A0 =A0FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWar=
n
> =A0 =A0 =A0 =A0PARENT DBI::db=3DHASH(0x242e7ec)
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 =A0 =A0NUM_OF_FIELDS 5
> =A0 =A0 =A0 =A0NUM_OF_PARAMS 0
> =A0 =A0 dbih_clearcom 0x2e48dcc (com 0x24459b4, type 3) done.
>
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::db=3DHASH(0x242e6ac) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 <> DESTROY(DBI::db=3DHASH(0x242e6ac)) ignored for outer handle
> (inner DBI::db=3DHASH(0x242e7ec) has ref cnt 1)
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::db=3DHASH(0x242e7ec) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 -> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x242e7ec)~INNER)
> thr#3424c
> imp_dbh->pmysql: 242864c
> =A0 =A0 <- DESTROY=3D undef
> =A0 =A0 DESTROY (dbih_clearcom) (dbh 0x242e7ec, com 0x245a44c, imp
> DBD::mysql::db):
> =A0 =A0 =A0 =A0FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWar=
n
> AutoCommit
> =A0 =A0 =A0 =A0PARENT DBI::dr=3DHASH(0x242ec9c)
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 =A0 =A0IMP_DATA HASH(0x242e78c)
> =A0 =A0 dbih_clearcom 0x242e7ec (com 0x245a44c, type 2) done.
>
> =A0 =A0 -- DBI::END ($@: , $!: )
> =A0 =A0 >> disconnect_all DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/3 @1 g0
> ima801 pid#18652) at C:/Perl/site/lib/DBI.pm line 731 via =A0at k:/
> Projects/NewRiskModel/Simple.Risk.Model.pl line 0
> =A0 =A0 -> disconnect_all for DBD::mysql::dr
> (DBI::dr=3DHASH(0x24066d4)~0x242ec9c) thr#3424c
> =A0 =A0 <- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
> line 731 via =A0at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
> ! =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/1 @1 g0
> ima10004 pid#18652) during global destruction
> ! =A0 <> DESTROY(DBI::dr=3DHASH(0x24066d4)) ignored for outer handle
> (inner DBI::dr=3DHASH(0x242ec9c) has ref cnt 1)
> ! =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::dr=3DHASH(0x242ec9c) rc1/1 @1 g0
> ima10004 pid#18652) during global destruction
> ! =A0 -> DESTROY in DBD::_::common for DBD::mysql::dr
> (DBI::dr=3DHASH(0x242ec9c)~INNER) thr#3424c
> ! =A0 <- DESTROY=3D undef during global destruction
> =A0 =A0 DESTROY (dbih_clearcom) (drh 0x242ec9c, com 0x23f95d4, imp global
> destruction):
> =A0 =A0 =A0 =A0FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
> =A0 =A0 =A0 =A0PARENT undef
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 dbih_clearcom 0x242ec9c (com 0x23f95d4, type 1) done.
>
> Trace:
> k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
> NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
> Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
> (eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
>
> Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
> Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> destruction.
>
> Compilation finished at Wed May 19 16:41:23
>
> Correct me if I am wrong, it looks like DBI is disconnecting/
> destroying children recursively up through their parents, until
> everything is destroyed, and then the error happens. =A0It still isn't
> clear what object it is trying to call fetch on. =A0I will continue
> trying with still higher trace levels, but I am baffled why this hits
> here but not in my other scripts that use DBI. =A0It doesn't seem to
> matter if I call $dbh->disconnect(), though my inclination is to call
> it once I have all the data I need to process.
>
> Any other ideas about why this happens and how best to address it?
>
> Thanks
>
> Ted
Just an update, the trae output does not change even if I go up to the
highest trace level.
------------------------------
Date: Wed, 19 May 2010 17:40:56 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <f5be200b-85bd-4707-b766-e1d8f08f24b1@f13g2000vbm.googlegroups.com>
On May 19, 5:46=A0pm, Ted Byers <r.ted.by...@gmail.com> wrote:
> On May 13, 5:56=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
>
>
> > On May 13, 11:56=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > On May 13, 2:03=A0pm, "C.DeRykus" <dery...@gmail.com> wrote:
>
> > > > On May 13, 10:10=A0am, Ted Byers <r.ted.by...@gmail.com> wrote:
>
> > > > > I have done all the usual things (as specified in the FAQ), and m=
ore,
> > > > > but it isn't enough.
>
> > > > > Here is how my script starts:
>
> > > > > use strict;
> > > > > use warnings;
> > > > > use DBI;
> > > > > use DateTime::Format::MySQL;
> > > > > use Date::Manip;
> > > > > use DateTime::Format::DateManip;
>
> > > > > BEGIN {
> > > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__WARN__} =3D sub{ print STDERR "Per=
l: ", @_; };
> > > > > =A0 =A0 =A0 =A0 =A0 =A0 $SIG{__DIE__} =A0=3D sub{ print STDERR "P=
erl: ", @_; exit 1};
>
> > > > > }
>
> > > > > $| =3D 1;
>
> > > > > In the body of the script, this script does very little except ma=
ke a
> > > > > DB connection, place the values from the record set that results =
from
> > > > > a trivial select query into a variable, and then prints it. =A0Th=
en all
> > > > > handles are closed and the progrma ends. =A0The error actually ar=
ises
> > > > > after the last statement (and does not appear in ANY of my other
> > > > > scripts that use the packes listed above).
>
> > > > > Here is the error statement I get:
>
> > > > > Perl: Can't call method "FETCH" on an undefined value at C:/Perl/=
site/
> > > > > lib/Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > > > > destruction.
>
> > > > > At no time have I made direct use of the file mentioned, so it mu=
st be
> > > > > something one of the above packages has done. =A0However, there i=
s no
> > > > > information provided as to what happened that led to this error. =
=A0It
> > > > > does not even say what object is being destructed or what package
> > > > > created, or failed to create, it.
>
> > > > > How can I modify the signal handling I set up above so that I can=
get
> > > > > this information?
>
> > > > Here's an purported cure:
>
> > > > =A0 =A0END { $^W =3D 0; }
>
> > > Alas, the purported cure "END { $^W =3D 0; }" doesn't work in this
> > > instance (unless I used it incorrectly). =A0In any event, do you know
> > > how that purported cure is supposed to work?
>
> > I thought I recalled seeing the error/cure once before.
> > But, here's a thread that suggests just wrapping the
> > disconnect. Their error output is virtually the same:
>
> > { $^W =3D 0; $dbh->disconnect }
>
> > =A0 perl case.pl
> > =A0 =A0 =A0 =A0 =A0DBI::db=3DHASH(0x8f68e40) trace level set to 9 in
> > =A0 =A0 =A0 =A0 =A0...
> > =A0 =A0 =A0 =A0 =A0 <- DESTROY=3D undef at unknown location!
> > =A0 =A0 =A0 =A0 =A0 (in cleanup) Can't call method "FETCH" on an
> > =A0 =A0 =A0 =A0 =A0 =A0undefined value at
> > =A0 =A0 =A0 =A0 =A0 =A0 C:/opt/perl/site/lib/Win32/TieRegistry.pm
> > =A0 =A0 =A0 =A0 =A0 =A0 line 1486 during global destruction.
>
> > > I am using ActiveSate's perl (v5.10.0) on Windows, and have examined
> > > each of the tools I thought might have something useful, but either
> > > they didn't have something that would answer my question or I didn't
> > > understand the documentation.
>
> > > Almost a decade ago, I wrote a C++ template class that I used to wrap
> > > all exception classes and, using RTTI, I made exceptions traceable,
> > > including not only the line and file of the source code where the
> > > exception arose but also the class affected and all functions applied
> > > to it from the time an instance of the class was created to the time
> > > the exception was produced; and this in addition to a simple call
> > > stack. =A0This proved priceless in debugging my own code (and
> > > identifying cases where I was hit by a bug in one or another of the
> > > libraries I used, so I could focus on finding a work-around rather
> > > than seeking a bug that didn't exist in my code). =A0But, it was =A0u=
seful
> > > only when I could compile it into my code which normally meant my own
> > > code only. =A0Alas, it relied on compiler specific macros in addition=
to
> > > a couple of my own, and the language has changed since I did that.
>
> > > Anyway, in addition to making this specific error go away, what I
> > > really need is something I can include at the top of my script and
> > > have it produce info about any object the script makes (whether
> > > explicitly or indirectly as part of the internals of a package that
> > > had been included), and what happens to it, but prints this info only
> > > if that object is involved in an error: basically a perl equivalent o=
f
> > > the traceable exceptions I'd made in C++ so very long ago. =A0
> > > ...
>
> > If this new cure doesn't work, you might try one of DBI's
> > higher trace settings too as they demo in the thread.
>
> > --
> > Charles DeRykus
>
> OK, Combining Steve's suggestion (with teh suggested ammendment
> regarding '&;), with yours, at trace level 10, I get the following
> output AFTER all my source code has been executed correctly:
>
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::st=3DHASH(0x242e39c) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 <> DESTROY(DBI::st=3DHASH(0x242e39c)) ignored for outer handle
> (inner DBI::st=3DHASH(0x2e48dcc) has ref cnt 1)
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::st=3DHASH(0x2e48dcc) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 -> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e48dcc)~INNER)
> thr#3424c
> =A0 =A0 <- DESTROY=3D undef
> =A0 =A0 DESTROY (dbih_clearcom) (sth 0x2e48dcc, com 0x24459b4, imp
> DBD::mysql::st):
> =A0 =A0 =A0 =A0FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWar=
n
> =A0 =A0 =A0 =A0PARENT DBI::db=3DHASH(0x242e7ec)
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 =A0 =A0NUM_OF_FIELDS 5
> =A0 =A0 =A0 =A0NUM_OF_PARAMS 0
> =A0 =A0 dbih_clearcom 0x2e48dcc (com 0x24459b4, type 3) done.
>
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::db=3DHASH(0x242e6ac) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 <> DESTROY(DBI::db=3DHASH(0x242e6ac)) ignored for outer handle
> (inner DBI::db=3DHASH(0x242e7ec) has ref cnt 1)
> =A0 =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::db=3DHASH(0x242e7ec) rc1/1 @1 g=
0
> ima10004 pid#18652)
> =A0 =A0 -> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x242e7ec)~INNER)
> thr#3424c
> imp_dbh->pmysql: 242864c
> =A0 =A0 <- DESTROY=3D undef
> =A0 =A0 DESTROY (dbih_clearcom) (dbh 0x242e7ec, com 0x245a44c, imp
> DBD::mysql::db):
> =A0 =A0 =A0 =A0FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWar=
n
> AutoCommit
> =A0 =A0 =A0 =A0PARENT DBI::dr=3DHASH(0x242ec9c)
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 =A0 =A0IMP_DATA HASH(0x242e78c)
> =A0 =A0 dbih_clearcom 0x242e7ec (com 0x245a44c, type 2) done.
>
> =A0 =A0 -- DBI::END ($@: , $!: )
> =A0 =A0 >> disconnect_all DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/3 @1 g0
> ima801 pid#18652) at C:/Perl/site/lib/DBI.pm line 731 via =A0at k:/
> Projects/NewRiskModel/Simple.Risk.Model.pl line 0
> =A0 =A0 -> disconnect_all for DBD::mysql::dr
> (DBI::dr=3DHASH(0x24066d4)~0x242ec9c) thr#3424c
> =A0 =A0 <- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
> line 731 via =A0at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
> ! =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::dr=3DHASH(0x24066d4) rc1/1 @1 g0
> ima10004 pid#18652) during global destruction
> ! =A0 <> DESTROY(DBI::dr=3DHASH(0x24066d4)) ignored for outer handle
> (inner DBI::dr=3DHASH(0x242ec9c) has ref cnt 1)
> ! =A0 >> DESTROY =A0 =A0 DISPATCH (DBI::dr=3DHASH(0x242ec9c) rc1/1 @1 g0
> ima10004 pid#18652) during global destruction
> ! =A0 -> DESTROY in DBD::_::common for DBD::mysql::dr
> (DBI::dr=3DHASH(0x242ec9c)~INNER) thr#3424c
> ! =A0 <- DESTROY=3D undef during global destruction
> =A0 =A0 DESTROY (dbih_clearcom) (drh 0x242ec9c, com 0x23f95d4, imp global
> destruction):
> =A0 =A0 =A0 =A0FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
> =A0 =A0 =A0 =A0PARENT undef
> =A0 =A0 =A0 =A0KIDS 0 (0 Active)
> =A0 =A0 dbih_clearcom 0x242ec9c (com 0x23f95d4, type 1) done.
>
> Trace:
> k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
> NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
> Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
> (eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
>
> Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
> Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> destruction.
>
> Compilation finished at Wed May 19 16:41:23
>
> Correct me if I am wrong, it looks like DBI is disconnecting/
> destroying children recursively up through their parents, until
> everything is destroyed, and then the error happens. =A0It still isn't
> clear what object it is trying to call fetch on. =A0I will continue
> trying with still higher trace levels, but I am baffled why this hits
> here but not in my other scripts that use DBI. =A0It doesn't seem to
> matter if I call $dbh->disconnect(), though my inclination is to call
> it once I have all the data I need to process.
>
> Any other ideas about why this happens and how best to address it?
>
> Thanks
>
> Ted
Just an update, the trae output does not change even if I go up to the
highest trace level.
------------------------------
Date: Wed, 19 May 2010 18:05:07 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <37e91db9-1ddd-4e62-958d-359c827ca95d@z17g2000vbd.googlegroups.com>
On May 19, 6:54=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Ted Byers <r.ted.by...@gmail.com>:
>
>
>
> > Trace:
> > k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
> > NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
> > Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
> > (eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
>
> > Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
> > Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > destruction.
>
> > Compilation finished at Wed May 19 16:41:23
>
> Am I correct that line 1485 of your copy of Win32/TieRegistry.pm is the
> last line here?
>
> =A0 =A0 sub DESTROY
> =A0 =A0 {
> =A0 =A0 =A0 =A0 my $self=3D shift(@_);
> =A0 =A0 =A0 =A0 return =A0 if =A0tied(%$self);
> =A0 =A0 =A0 =A0 my $unload;
> =A0 =A0 =A0 =A0 eval { $unload=3D $self->{UNLOADME}; 1 }
>
> If so I can't see how that could be calling tie magic, since the code's
> just checked that it *isn't* tied. In any case, back up your copy of
> Win32/TieRegistry.pm and add
>
> =A0 =A0 use Devel::Peek ();
> =A0 =A0 use Carp ();
> =A0 =A0 Devel::Peek::Dump($self);
> =A0 =A0 Carp::confess("huh?");
>
> just before that line, and post the result.
>
> Ben
Thanks Ben,
I hadn't noticed that, but I was out of my depth as I have never used
the tie magic, and didn't know which of the packages I used would or
why.
In any event, here is the output after adding the four lines you
suggest:
>> disconnect DISPATCH (DBI::db=3DHASH(0x244bc3c) rc1/1 @1 g0
ima10c01 pid#29840) at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 228
-> disconnect for DBD::mysql::db
(DBI::db=3DHASH(0x244bc3c)~0x244bd7c) thr#3424c
imp_dbh->pmysql: 244f314
<- disconnect=3D 1 at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 228
>> DESTROY DISPATCH (DBI::st=3DHASH(0x244b92c) rc1/1 @1 g0
ima10004 pid#29840)
<> DESTROY(DBI::st=3DHASH(0x244b92c)) ignored for outer handle
(inner DBI::st=3DHASH(0x2e95e3c) has ref cnt 1)
>> DESTROY DISPATCH (DBI::st=3DHASH(0x2e95e3c) rc1/1 @1 g0
ima10004 pid#29840)
-> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e95e3c)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (sth 0x2e95e3c, com 0x2476014, imp
DBD::mysql::st):
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=3DHASH(0x244bd7c)
KIDS 0 (0 Active)
NUM_OF_FIELDS 5
NUM_OF_PARAMS 0
dbih_clearcom 0x2e95e3c (com 0x2476014, type 3) done.
>> DESTROY DISPATCH (DBI::db=3DHASH(0x244bc3c) rc1/1 @1 g0
ima10004 pid#29840)
<> DESTROY(DBI::db=3DHASH(0x244bc3c)) ignored for outer handle
(inner DBI::db=3DHASH(0x244bd7c) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=3DHASH(0x244bd7c) rc1/1 @1 g0
ima10004 pid#29840)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x244bd7c)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (dbh 0x244bd7c, com 0x247e3b4, imp
DBD::mysql::db):
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=3DHASH(0x245a424)
KIDS 0 (0 Active)
IMP_DATA HASH(0x244bd1c)
dbih_clearcom 0x244bd7c (com 0x247e3b4, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=3DHASH(0x2428bdc) rc1/3 @1 g0
ima801 pid#29840) at C:/Perl/site/lib/DBI.pm line 731 via at k:/
Projects/NewRiskModel/Simple.Risk.Model.pl line 0
-> disconnect_all for DBD::mysql::dr
(DBI::dr=3DHASH(0x2428bdc)~0x245a424) thr#3424c
<- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
line 731 via at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x2428bdc) rc1/1 @1 g0
ima10004 pid#29840) during global destruction
! <> DESTROY(DBI::dr=3DHASH(0x2428bdc)) ignored for outer handle
(inner DBI::dr=3DHASH(0x245a424) has ref cnt 1)
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x245a424) rc1/1 @1 g0
ima10004 pid#29840) during global destruction
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x245a424)~INNER) thr#3424c
! <- DESTROY=3D undef during global destruction
DESTROY (dbih_clearcom) (drh 0x245a424, com 0x1836ffc, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x245a424 (com 0x1836ffc, type 1) done.
SV =3D RV(0x22c15b0) at 0x22c15a4
REFCNT =3D 1
FLAGS =3D (PADMY,ROK)
RV =3D 0x1c53074
SV =3D PVHV(0x1e45c4c) at 0x1c53074
REFCNT =3D 2
FLAGS =3D (OBJECT,SHAREKEYS)
STASH =3D 0x1f5b01c "Win32::TieRegistry"
ARRAY =3D 0x222f58c (0:14, 1:14, 2:4)
hash quality =3D 121.5%
KEYS =3D 22
FILL =3D 18
MAX =3D 31
RITER =3D -1
EITER =3D 0x0
Elt "CntValues" HASH =3D 0x359bb702
SV =3D IV(0x230a7b0) at 0x230a7b4
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 0
Elt "MaxSubClassLen" HASH =3D 0xb3d551a2
SV =3D IV(0x230a860) at 0x230a864
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 0
Elt "FLAGS" HASH =3D 0x1773e623
SV =3D IV(0x230a9c0) at 0x230a9c4
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 136
Trace:
k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
Perl/site/lib/Win32/TieRegistry.pm, Line: 1488
Carp::confess, C:/Perl/lib/Carp.pm, Line: 45
huh? at C:/Perl/site/lib/Win32/TieRegistry.pm line 1488
Win32::TieRegistry::DESTROY('Win32::TieRegistry=3DHASH(0x1c53074)')
called at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
eval {...} called at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 0
Compilation finished at Wed May 19 20:59:57
Adding your four lines seems to have added the lines beginning with SV
=3D RV(0x22c15b0) at 0x22c15a4, but none of that info means anything to
me.
Any light that can be shed on this would be appreciated.
Thanks
Ted
------------------------------
Date: Wed, 19 May 2010 18:05:20 -0700 (PDT)
From: Ted Byers <r.ted.byers@gmail.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <7dba3183-eeb3-452a-a7c5-6257b571ef8c@e28g2000vbd.googlegroups.com>
On May 19, 6:54=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Ted Byers <r.ted.by...@gmail.com>:
>
>
>
> > Trace:
> > k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
> > NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
> > Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
> > (eval), C:/Perl/site/lib/Win32/TieRegistry.pm, Line: 1485
>
> > Can't call method "FETCH" on an undefined value at C:/Perl/site/lib/
> > Win32/TieRegistry.pm line 1485, <DATA> line 335 during global
> > destruction.
>
> > Compilation finished at Wed May 19 16:41:23
>
> Am I correct that line 1485 of your copy of Win32/TieRegistry.pm is the
> last line here?
>
> =A0 =A0 sub DESTROY
> =A0 =A0 {
> =A0 =A0 =A0 =A0 my $self=3D shift(@_);
> =A0 =A0 =A0 =A0 return =A0 if =A0tied(%$self);
> =A0 =A0 =A0 =A0 my $unload;
> =A0 =A0 =A0 =A0 eval { $unload=3D $self->{UNLOADME}; 1 }
>
> If so I can't see how that could be calling tie magic, since the code's
> just checked that it *isn't* tied. In any case, back up your copy of
> Win32/TieRegistry.pm and add
>
> =A0 =A0 use Devel::Peek ();
> =A0 =A0 use Carp ();
> =A0 =A0 Devel::Peek::Dump($self);
> =A0 =A0 Carp::confess("huh?");
>
> just before that line, and post the result.
>
> Ben
Thanks Ben,
I hadn't noticed that, but I was out of my depth as I have never used
the tie magic, and didn't know which of the packages I used would or
why.
In any event, here is the output after adding the four lines you
suggest:
>> disconnect DISPATCH (DBI::db=3DHASH(0x244bc3c) rc1/1 @1 g0
ima10c01 pid#29840) at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 228
-> disconnect for DBD::mysql::db
(DBI::db=3DHASH(0x244bc3c)~0x244bd7c) thr#3424c
imp_dbh->pmysql: 244f314
<- disconnect=3D 1 at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 228
>> DESTROY DISPATCH (DBI::st=3DHASH(0x244b92c) rc1/1 @1 g0
ima10004 pid#29840)
<> DESTROY(DBI::st=3DHASH(0x244b92c)) ignored for outer handle
(inner DBI::st=3DHASH(0x2e95e3c) has ref cnt 1)
>> DESTROY DISPATCH (DBI::st=3DHASH(0x2e95e3c) rc1/1 @1 g0
ima10004 pid#29840)
-> DESTROY for DBD::mysql::st (DBI::st=3DHASH(0x2e95e3c)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (sth 0x2e95e3c, com 0x2476014, imp
DBD::mysql::st):
FLAGS 0x180191: COMSET Warn RaiseError PrintError PrintWarn
PARENT DBI::db=3DHASH(0x244bd7c)
KIDS 0 (0 Active)
NUM_OF_FIELDS 5
NUM_OF_PARAMS 0
dbih_clearcom 0x2e95e3c (com 0x2476014, type 3) done.
>> DESTROY DISPATCH (DBI::db=3DHASH(0x244bc3c) rc1/1 @1 g0
ima10004 pid#29840)
<> DESTROY(DBI::db=3DHASH(0x244bc3c)) ignored for outer handle
(inner DBI::db=3DHASH(0x244bd7c) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=3DHASH(0x244bd7c) rc1/1 @1 g0
ima10004 pid#29840)
-> DESTROY for DBD::mysql::db (DBI::db=3DHASH(0x244bd7c)~INNER)
thr#3424c
<- DESTROY=3D undef
DESTROY (dbih_clearcom) (dbh 0x244bd7c, com 0x247e3b4, imp
DBD::mysql::db):
FLAGS 0x180391: COMSET Warn RaiseError PrintError PrintWarn
AutoCommit
PARENT DBI::dr=3DHASH(0x245a424)
KIDS 0 (0 Active)
IMP_DATA HASH(0x244bd1c)
dbih_clearcom 0x244bd7c (com 0x247e3b4, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=3DHASH(0x2428bdc) rc1/3 @1 g0
ima801 pid#29840) at C:/Perl/site/lib/DBI.pm line 731 via at k:/
Projects/NewRiskModel/Simple.Risk.Model.pl line 0
-> disconnect_all for DBD::mysql::dr
(DBI::dr=3DHASH(0x2428bdc)~0x245a424) thr#3424c
<- disconnect_all=3D (not implemented) at C:/Perl/site/lib/DBI.pm
line 731 via at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x2428bdc) rc1/1 @1 g0
ima10004 pid#29840) during global destruction
! <> DESTROY(DBI::dr=3DHASH(0x2428bdc)) ignored for outer handle
(inner DBI::dr=3DHASH(0x245a424) has ref cnt 1)
! >> DESTROY DISPATCH (DBI::dr=3DHASH(0x245a424) rc1/1 @1 g0
ima10004 pid#29840) during global destruction
! -> DESTROY in DBD::_::common for DBD::mysql::dr
(DBI::dr=3DHASH(0x245a424)~INNER) thr#3424c
! <- DESTROY=3D undef during global destruction
DESTROY (dbih_clearcom) (drh 0x245a424, com 0x1836ffc, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x245a424 (com 0x1836ffc, type 1) done.
SV =3D RV(0x22c15b0) at 0x22c15a4
REFCNT =3D 1
FLAGS =3D (PADMY,ROK)
RV =3D 0x1c53074
SV =3D PVHV(0x1e45c4c) at 0x1c53074
REFCNT =3D 2
FLAGS =3D (OBJECT,SHAREKEYS)
STASH =3D 0x1f5b01c "Win32::TieRegistry"
ARRAY =3D 0x222f58c (0:14, 1:14, 2:4)
hash quality =3D 121.5%
KEYS =3D 22
FILL =3D 18
MAX =3D 31
RITER =3D -1
EITER =3D 0x0
Elt "CntValues" HASH =3D 0x359bb702
SV =3D IV(0x230a7b0) at 0x230a7b4
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 0
Elt "MaxSubClassLen" HASH =3D 0xb3d551a2
SV =3D IV(0x230a860) at 0x230a864
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 0
Elt "FLAGS" HASH =3D 0x1773e623
SV =3D IV(0x230a9c0) at 0x230a9c4
REFCNT =3D 1
FLAGS =3D (IOK,pIOK)
IV =3D 136
Trace:
k:/Projects/NewRiskModel/Simple.Risk.Model.pl, (eval), k:/Projects/
NewRiskModel/Simple.Risk.Model.pl, Win32::TieRegistry::DESTROY, C:/
Perl/site/lib/Win32/TieRegistry.pm, Line: 1488
Carp::confess, C:/Perl/lib/Carp.pm, Line: 45
huh? at C:/Perl/site/lib/Win32/TieRegistry.pm line 1488
Win32::TieRegistry::DESTROY('Win32::TieRegistry=3DHASH(0x1c53074)')
called at k:/Projects/NewRiskModel/Simple.Risk.Model.pl line 0
eval {...} called at k:/Projects/NewRiskModel/Simple.Risk.Model.pl
line 0
Compilation finished at Wed May 19 20:59:57
Adding your four lines seems to have added the lines beginning with SV
=3D RV(0x22c15b0) at 0x22c15a4, but none of that info means anything to
me.
Any light that can be shed on this would be appreciated.
Thanks
Ted
------------------------------
Date: Wed, 19 May 2010 15:27:05 -0700
From: sln@netherlands.com
Subject: Re: FAQ 5.38 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl?
Message-Id: <7po8v5dg84c1q92o3af6qjfv07o8dolco8@4ax.com>
On Wed, 19 May 2010 22:00:02 GMT, PerlFAQ Server <brian@theperlreview.com> wrote:
>This is an excerpt from the latest version perlfaq5.pod, which
>comes with the standard Perl distribution. These postings aim to
>reduce the number of repeated questions as well as allow the community
>to review and update the answers. The latest version of the complete
>perlfaq is at http://faq.perl.org .
>
>--------------------------------------------------------------------
>
>5.38: Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl?
^^^^^^^^^^^
I think this needs a new title.
The answer of course is not that 'use strict/warnings' is off.
One would have to asume Perl is involved, its that 'let me' that
gets me.
Documentor's have always been about permission, same with
IT department head of 'security'.
I think Perl could enhance itself, maybe check permissions,
throw back a little "Are you sure?".
-sln
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 2954
***************************************