On 12/22/05 10:21 AM, Uwe Voelker wrote:
> Just a quick look at the contents of the RDBO object. Especially
> DateTime columns are so huge when dumped.
Ah, I see. There's nothing built-in, but you could probably write your own
dumper thingie by just iterating over the columns and printing their values.
DateTime objects stringify in a sane way, after all.
sub dump_object
{
my $o = shift;
foreach my $column ($o->meta->columns)
{
my $method = $column->accessor_method_name;
no warnings 'uninitialized';
print "$column = ", $o->$method(), "\n";
}
}
Something like that. If you come up with something really nice, send it to
me and I'll add it to Rose::DB::Object::Util :)
> In the same context: is there a way to get the object content as a hashref?
Well, the objects are hashrefs, after all :) Anyway, using an approach like
the above you could whip something up yourself.
-John
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object