I'am new to DBIx::Class. Iam using it for an API to retun data from my DB and i want to recreate a SELECT * FROM table with DBIC. With DBI it worked well for me.
What is the best approach to return data "beautiful"?
I want to return the data in a array of hashes like:
[
{
id => 123,
name => 'name',
....
}
]
But with my @rs = $schema->resultset('Product')->all; return \@rs;. I get not the output i want.
On inspecting the objects with Data::Dumper i get the following:
$VAR1 = bless( {
'_column_data' => {
'name' => 'test',
'id' => 123'
},
'_result_source' => $VAR1->{'_result_source'},
'_in_storage' => 1
}, 'DB::Schema::Result::Product' );
I'am sure i missunderstood the concept of DBIC.
How can i get the data of all colums only? Thank you all for Help!