According to the HowTo https://metacpan.org/dist/DBD-MariaDB/view/lib/DBD/MariaDB/INSTALL.pod#CPAN-installation, you need to install MariaDB Connector/C, which is a dependency.
$ sudo apt install libmariadb3 libmariadb-dev
After that go ahead and install DBD::MariaDB using MCPAN.
Installation
moving to MariaDB
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 5 posting(s) in 1 day