This looks like a subclassing bug. If you search google with the text of the error in quotes you will find references to this problem such as here(1), here(2), here(3) and here(4).

Link 2 above has some code, and link 3 has the trace.

The problem has hit people upgrading to DBI 1.15 from 1.13. If you post some code maybe we can find a similar problem where you might be having problems with inheritance like the code below from link 1.

Re: DBI 1.15 subclassing bug! ---------------------------------------------------------------------- +---------- To: "dbi-users" <dbi-users@perl.org> Subject: Re: DBI 1.15 subclassing bug! From: "Phil R Lawrence" <prlawrence@Lehigh.EDU> Date: Mon, 9 Apr 2001 11:40:39 -0400 Cc: "Tim Bunce" <Tim.Bunce@ig.co.uk> Delivered-To: mailing list dbi-users@perl.org Mailing-List: contact dbi-users-help@perl.org; run by ezmlm References: <00a501c0bede$2b70be00$5b34b480@lehigh.edu> <2001040700050 +9.F20472@ig.co.uk> ---------------------------------------------------------------------- +---------- "Tim Bunce" <Tim.Bunce@ig.co.uk> wrote: > On Fri, Apr 06, 2001 at 05:11:38PM -0400, Phil R Lawrence wrote: > > Uncaught exception from user code: > > DBI->disconnect is not a DBI method... > I wouldn't want to call you a beginner, but somewhere, for some > reason, you're executing "DBI->disconnect" or "$foo->disconnect" > where $foo contains "DBI". You were kind to not call me a beginner! Nonetheless, the issue was a screwed up @ISA ordering. See below for the bug. I'm glad you added the code to make DBI->disconnect blow up in DBI 1.15. I learned a bit more about inheritance as a result. Thanks, Phil R Lawrence package STORIT; use SUBCLASS_DBI; use vars qw( @ISA ); @ISA = qw ( SUBCLASS_DBI ); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $s = $class->test_connect or die; return $s; } #============================================================== package STORIT::db; use vars qw( @ISA ); @ISA = qw( STORIT SUBCLASS_DBI::db ); # ^^^^^^ # this caused disconnect invocation to be first looked # for as a DBI method (due to STORIT's @ISA) instead # of as a SUBCLASS_DBI::db method (which would have # correctly resolved as a DBI::db method). #============================================================== package STORIT::st; use vars qw( @ISA ); @ISA = qw(SUBCLASS_DBI::st);

In reply to Re: DBI-disconnect ??? by mattr
in thread DBI-disconnect ??? by christopherbarsuk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.