From 57e95681d4b4e51fb48e1925690a0960d594016b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 23 Jul 2021 15:19:30 -0400 Subject: [PATCH] Bug 28306: Fix POD Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- Koha/Database.pm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Koha/Database.pm b/Koha/Database.pm index 2dc5101a83..0cedcf99ad 100644 --- a/Koha/Database.pm +++ b/Koha/Database.pm @@ -37,12 +37,25 @@ use Koha::Config; our $database; -# FIXME: It is useless to have a Koha::Database object since all methods -# below act as class methods -# Koha::Database->new->schema is exactly the same as Koha::Database->schema -# We should use Koha::Database->schema everywhere and remove the `new` method +=head2 new + + $schema = Koha::Database->new->schema; + + FIXME: It is useless to have a Koha::Database object since all methods + below act as class methods + Koha::Database->new->schema is exactly the same as Koha::Database->schema + We should use Koha::Database->schema everywhere and remove the `new` method + +=cut + sub new { bless {}, shift } +=head2 dbh + + Returns a database handler without loading the DBIx::Class schema. + +=cut + sub dbh { my $config = Koha::Config->get_instance; my $driver = db_scheme2dbi($config->get('db_scheme')); -- 2.39.5