Re: [CDBI] Subroutine redefined

[prev] [thread] [next] [Date index for 2004/09/03]

From: Sean Quinlan
Subject: Re: [CDBI] Subroutine redefined
Date: 18:08 on 03 Sep 2004
--=-bbgKQnE83oH25shKxMNR
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2004-09-03 at 12:48, William McKee wrote:
> I think Dave was spot on regarding the cause of the redefined warnings.
> However, based on Tony's post to the list yesterday concerning
> might_have relationships, I think this is the wrong relation to use
> because I'd be surprised if the Reviewer ID would be the same as the
> Applicant ID (that would mean a reviewer would be assigned to a single
> applicant). I'd suggest the has_a relation.

Thanks William! Changing might_have to has_a seems to resolve the
redefined error I was still getting after dropping the column
specification as Dave suggested. However, I'm left a bit ... confused by
that. Maybe it's my interpretation of the terms, but I don't see why one
would cause a compile redefined error and the other not. I also have a
mnemonic problem - an applicant might have a reviewer ... but they might
not have been assigned one yet, so wouldn't the has_a cause a problem at
run time?!?

Also, while that took care of the problems of redefined subroutines,
this class:
package BioInfo::DB::Qualifiers;
use base 'BioInfo::DB::Class';
BioInfo::DB::Qualifiers->table('Qualifiers');
BioInfo::DB::PETP->columns(Primary =3D> qw/Student Type/);
BioInfo::DB::Qualifiers->columns(Essential =3D> qw/Date Score/);
BioInfo::DB::Qualifiers->has_a(Student =3D> 'BioInfo::DB::Students');

1;

Threw this error:
PERL_DL_NONLAZY=3D1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Class....has_a needs a valid column at
/usr/lib/perl5/site_perl/5.8.3/Class/DBI/Relationship/HasA.pm line 12
Compilation failed in require at t/Class.t line 10.
BEGIN failed--compilation aborted at t/Class.t line 10.

But changing _that_ definition to:
BioInfo::DB::Qualifiers->might_have(Student =3D> 'BioInfo::DB::Students');

Compiled without error?! And in this case, there _does_ have to be a
'Student'.

<sigh> ... I'm going to have to read a lot of source code this weekend,
eh? ;-}

Thanks again!

--=20
Sean Quinlan <seanq@xxxxxx.xx.xxx>
BMERC, Boston University

--=-bbgKQnE83oH25shKxMNR
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBOLM5nv2yYfTgGZsRAqncAJ41mclvMDrMPzmHjOpvH9HEHLzsngCeJEWl
W9j9bgkM6KiSA/GjmJoiglA=
=lYtn
-----END PGP SIGNATURE-----

--=-bbgKQnE83oH25shKxMNR--

Subroutine redefined
Sean Quinlan 15:06 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
William McKee 16:48 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
Sean Quinlan 18:08 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
William McKee 19:05 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
Sean Quinlan 19:48 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
William McKee 20:34 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
Sean Quinlan 17:56 on 03 Sep 2004

Re: [CDBI] Subroutine redefined
Drew Taylor 18:12 on 03 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52