[prev] [thread] [next] [Date index for 2005/04/13]
This is a multi-part message in MIME format. ------=_NextPart_000_0212_01C54021.D65350D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi -- I am closing in on the problem. The code my $rebase =3D Class::DBI::Factory->new; $rebase->set_db ({db_type =3D> 'mysql', db_name =3D> 'rebase', db_username =3D> 'barry', db_password =3D> '', }); print "user: " . $rebase->config->get('db_username') . =20 " pw: " . $rebase->config->get('db_password');=20 correctly gives: user: barry pw:=20 but the next code executed: $rebase->use_classes (qw/Enzyme EnzymeSite Site/); my $enzyme =3D $rebase->retrieve('enzyme', name =3D> 'EcoRI'); =20 when it gets to the cdf::_dbc code of $self->config->get('db_username'),=20 $self->config->get('db_password'),=20 gives: db_username: no such variable db_password: no such variable and the retrieve fails. Why does $rebase find the values and $self does not?=20 I did notice that $rebase and $self have different timestamps indicating = that they are different instances. The $self instance first appears in = CDF::dbh. It that what is supposed to happen? TIA, Barry ------=_NextPart_000_0212_01C54021.D65350D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi --</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> I am closing in on = the=20 problem.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>The code</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>my $rebase =3D=20 Class::DBI::Factory->new;<BR> $rebase->set_db = ({db_type =3D>=20 'mysql',<BR> &= nbsp; =20 db_name =3D>=20 'rebase',<BR> = =20 db_username =3D>=20 'barry',<BR> &= nbsp; =20 db_password =3D>=20 '',<BR> = =20 });<BR> print "user: " . = $rebase->config->get('db_username')=20 . <BR> " pw: " .=20 $rebase->config->get('db_password'); </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>correctly gives:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>user: barry pw: </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>but the next code = executed:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2> = $rebase->use_classes=20 (qw/Enzyme EnzymeSite Site/);</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2> my $enzyme =3D=20 $rebase->retrieve('enzyme', name =3D> 'EcoRI'); = <BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>when it gets to the cdf::_dbc code = of</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New"=20 size=3D2> $self->config->get('db_username'),=20 <BR> $self->config->get('db_password'), = <BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>gives:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT size=3D2><FONT face=3D"Courier New">db_username: no such=20 variable<BR>db_password: no such variable</FONT></DIV></FONT> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>and the retrieve fails.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Why does $rebase find the values and = $self does=20 not? </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I did notice that $rebase and $self = have different=20 timestamps indicating that they are different instances. The $self = instance=20 first appears in CDF::dbh. It that what is supposed to=20 happen?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>TIA,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Barry</FONT></DIV></BODY></HTML> ------=_NextPart_000_0212_01C54021.D65350D0--
Factory
|
Re: Factory
|
Re: Factory
|
Generated at 12:49 on 16 Apr 2005 by mariachi v0.52