I am using Rose for one application and as it's very excellent, I have been
working to convert another old application to it. For this, I have a
library of large scripts that have been developed over several years and
which use basic DBI.
They use database fields that end up as hashes because I didn't write in an
OO fashion. The hashes are hiearchical in the same way that Rose uses a
hiearchy (I've spent quite a lot of time converting them to this), it's just
that they are hashes rather than being obtained from method calls. So all
over my code, I have statements like
"Creation date $thing{createdate}, postcode: $thing{address}{postcode}".
Yes, I know - I'm an amateur. But it will be a massive job converting all
this hash methodology to a PERL OO "method" methodology particularly as Rose
method calls don't interpolate. I am put off.
Anyone think of a shortcut? I thought I could implement a hack that after
grabbing the data with Rose would then go through each field creating the
hash which the rest of my scripts use. And before using Rose, I would need
to convert the hash to a Rose DB Object. Would provide me with an easy and
gradual transition but this is hardly elegant and perhaps the overhead would
be debilitating.
Also I had a little play with it and these conversions aren't terribly
straightforward since one has to also convert any hashes and arrays that
correspond to one-to-many and many-to-one relationships. Seems like a
recipe for disaster for "an amateur".
Just wondering if there might already exist some way to easily convert the
hierarchical hash to and from a Rose DB Object that corresponds to the
hierarchical data in the Rose DB Object (that corresponds to the
hieararchical data in the database itself)? Perhaps a hash already exists
within the internals of Rose that can be exploited if I knew how?
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object