For your entertainment OK, I'm working on a project which involves developing microarray designs. Currently there is a microarray module through which you can create and array design object, add oligos (short DNA sequences) to it, view it, output a galfile or csv file (just consider them types of specialized reports), etc.
I've also written a simple interactive shell for manipulating these designs. Where you see 'DNAcore Array Design: ' below is the readline prompt. Please keep in mind that this is basically prototype code. The modules will be kept but the interface will be improved later - probably using CGI or other GUI. As a teaser, here's the error. More explination below: DNAcore Array Design: load array 2 SV = RV(0x88acf80) at 0x888d38c REFCNT = 1 FLAGS = (ROK) RV = 0x888d368 (in cleanup) dbih_getcom handle DBI::db=HASH(0x888d368) is not a DBI handle (has no magic) at /usr/lib/perl5/site_perl/5.6.1 /DNAcore/DB.pm line 229. SV = RV(0x848fe88) at 0xbffff380 REFCNT = 1 FLAGS = (ROK,READONLY) RV = 0x888d368 Array 2 loaded DNAcore Array Design: add oligos Please enter SQL statement for getting oligos. Returned fields must be oligo ID, oligo Name and Source Plate in that order. Extra fields may be present, but will appear in galfile in the same order: SELECT Origin_Key,ExternalReference_ID,Plate,CONCAT(Row,Col) FROM DNAcore.Oligo,DNAcore.Well WHERE Oligo.ID = SourceID AND Source = 'Oligo' AND Plate = 40 ORDER BY Plate,Row,Col DNAcore Array Design: create galfile What I'm trying to add now is a way to save this object (hash) to a database. Currently I'm just using Data::Dumper to serialize. The idea is that a user can save a partially populated design (the structure has room for more oligos) and work on it later. Or create new 'reports' at any time [I'll probably keep this interface for myself regardless as a simple way to test new methods ongoing]. The part that saves a design works. When loading an existing design, the idea is to replace the array object in use with the saved one - revivified from the database. One other thing to note is that I have a DB module which wraps around DBI. It has a bunch of methods covering many common needs and passes any unrecognized calls directly to DBI (via AUTOLOAD). The array object contains a connection to the database (a DB object returned by our module), the reference to which is deleted before the object is dumped and stored in the database. When the interface calls new to replace the current object with the one the user wants to load, a fresh database connection is made, the stored object is retrieved, the database connection is added to the restored hash (same as if the object hash defined without loading from the database), and the hash is blessed and returned. The error output you see below occurs during this recreation process. Line 229 in DB.pm is the autoload passed call to DBI. At first I didn't think I made any calls to the DBI after fetching the stored object. After scratching my head a bit I noticed this line: $self->{DBH} = $temp-{DBH}; Which, with some advanced debugging (read prints) has been verified as the culprit. $self is the hashref created when the stored dump was evale'd, which gets returned to new, blessed and returned to the user. The actions taken afterthe error generated above, add oligos and create galfile, both worked. The database added to the restored object works fine. Sean _______________________________________________ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm