DBD::Go...rt::null(3)

✨ NAME ✨

DBD::Gofer::Transport::null β€” the DBD::Gofer client transport that exists purely for testing, bestie πŸ’–


🌸 SYNOPSIS 🌸

okay so you can just plug it straight into your connect call:

my $original_dsn = "..."
DBI->connect("dbi:Gofer:transport=null;dsn=$original_dsn",...)

or, if you'd rather flip it on globally, set the DBI_AUTOPROXY environment variable and let it cook πŸ”₯:

export DBI_AUTOPROXY="dbi:Gofer:transport=null"

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: you connect through DBD::Gofer, but every single request gets executed within the same process. Same vibe, zero network, no cap 🫢

It's a quick and simple way to test your apps for compatibility with the (few) restrictions that DBD::Gofer imposes. Like, does your code survive Gofer's rules? Run it through here and find out.

It also gives the DBI test suite a simple, portable way to test DBD::Gofer on all platforms with no setup. Iconic, honestly πŸ‘‘

And here's the third thing β€” it's lowkey a measurement tool πŸ“. By measuring the difference in performance between normal connections and connections via "dbi:Gofer:transport=null", you can measure the basic cost of using DBD::Gofer. And then, the additional cost of more advanced transports can be isolated by comparing their performance with the null transport. Science, but make it DBI πŸ§ͺ✨

The t/85gofer.t script in the DBI distribution includes a comparative benchmark, if you wanna see it in action.


πŸ’œ AUTHOR πŸ’œ

Tim Bunce, <http://www.tim.bunce.name>


Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.


🌈 SEE ALSO 🌈

  • DBD::Gofer::Transport::Base
  • DBD::Gofer

and that's the whole page, bestie, we ate πŸ’…βœ¨ this was pulled from the User Contributed Perl Documentation for DBD::Go...rt::null(3), perl v5.42.3, dated 2026-10-19 β€” go forth and test responsibly πŸ¦‹πŸ’–

πŸ“¦ where this page comes from