in reply to Re^2: Problems with DBIx::Class and SQL JOIN's
in thread Problems with DBIx::Class and SQL JOIN's

You only get one role at a time because the search was limited to the 'friend' role. To change that you need to change the 'where' criteria in the 1st hashref:
$c->model('DB::Users')->search_like( { 'username' => '%foo%' }, { join => { 'map_user_role' => 'role' }, '+select' => [ 'role.id', 'role.role' ], '+as' => [ 'roleid', 'role' ], rows => 10, }, );
The plus ("+") sign is needed because 'role.id' and 'role.role' do not originate in the Users schema/table