=cut
sub all {
my ($class) = @_;
my $class = shift;
my $dbh = C4::Context->dbh;
map {
return map { $class->new($_) } @{$dbh->selectall_arrayref(
utf8::encode($_->{description});
# The categories table is small enough for
$class->new($_);
# `SELECT *` to be harmless.
} @{C4::Context->dbh->selectall_arrayref(
"SELECT * FROM categories ORDER BY description",
"SELECT * FROM categories ORDER BY description", { Slice => {} }
{ Slice => {} },
)};
}
-