X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/972b87711cb3c7543d585ceedca0eda2058aa6d7..bc0e2edad8e8f94f85f2a59ceb784b8eb0cda97c:/SL/DB/Object.pm?ds=sidebyside diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 06596dd4f..c258761d1 100755 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -252,6 +252,19 @@ sub presenter { } } +sub as_debug_info { + my ($self) = @_; + + return { + map { + my $column_name = $_->name; + my $value = $self->$column_name; + $value = !defined($value) ? undef : "${value}"; + ($_ => $value) + } $self->meta->columns + }; +} + 1; __END__ @@ -383,6 +396,12 @@ with the same name as the class of the involking object. For the full documentation about its capabilites see L +=item C + +Returns a hash containing solely the essentials for dumping it with +L. The returned hash consists of the column names with +associated column values in stringified form. + =back =head1 AUTHOR