That is not how I read it...

Foo::Employee->has_a(employee => q{Foo::Employee});

That code shows that a recursive has_a is happening here linking Foo::Employee to itself. That on it's own should work, and I have used it successfully myself. But what about the following statement?

The idea was that if someone grabs the primary key of a row, return the object, not the integer PK.

That line implies to me that they are doing this with the primary key of the table. At least that's how I read it.

I'll admit that the fact that they are linking this to 'employee' makes it look suspect, but they specifically state they are dealing with a primary key... I guess a clarification by water would solve this confusion.

I do agree with your other comment that the segfault is not in Class::DBI. It could be an obscure perl bug, but more than likely it is the DBD driver for the database (either improperly installed, or buggy).

- Cees


In reply to Re: Re: Re: CDBI segfaults on me->has_a(me) by cees
in thread CDBI segfaults on me->has_a(me) by water

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.