X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FObject.pm;h=c258761d17b76eb7ca5c632521f7d99ce28264dd;hb=98056ff901abcbbbcf3f0499c3149056628631e8;hp=06596dd4f9aad706ffb444163c63ad701330db62;hpb=972b87711cb3c7543d585ceedca0eda2058aa6d7;p=kivitendo-erp.git 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