#!/usr/bin/perl

use Modern::Perl;

use Koha::DateUtils;
use Koha::Database;

my $dbh = C4::Context->dbh;
$dbh->{RaiseError} = 1;
$dbh->{PrintError} = 0;

$dbh->{AutoCommit} = 0;

my $borrowernumber = 999999999999;

SearchUsingDBIC( $borrowernumber );

$dbh->commit;
say "No error!";

sub SearchUsingDBIC {
    my ($borrowernumber) = @_; 

    my $schema       = Koha::Database->new()->schema();
    my $borrowers_rs = $schema->resultset('Borrower');
    $borrowers_rs->result_class('DBIx::Class::ResultClass::HashRefInflator');
    my $borrower = $borrowers_rs->find($borrowernumber);
}

