DBD::Go...y::Base(3)
π DBD::Gofer::Policy::Base β bestie edition π
okay so this page is from the Perl User Contributed Documentation, and it's about the base class for DBD::Gofer policies. yes, the title is technically DBD::Go...y::Base(3) because someone truncated the middle like a menace, but it's really DBD::Gofer::Policy::Base. let's get into it π
β¨ NAME β¨
DBD::Gofer::Policy::Base β the base class for all the DBD::Gofer policies. it's giving parent-energy. it's the mom of every policy class π«Ά
πΈ SYNOPSIS πΈ
$dbh = DBI->connect("dbi:Gofer:transport=...;policy=...", ...)
π¦ DESCRIPTION π¦
so DBD::Gofer can be configured through a "policy" mechanism, and what that does is let you fine-tune how many round-trips get made to the Gofer server. fewer round-trips = faster, more round-trips = more faithful to how things normally work. it's a whole tradeoff situation β¨
the policies are grouped into classes (and yes, those classes can be subclassed, girlboss behavior) and you reference them by the name of the class.
DBD::Gofer::Policy::Base is the base class for all the policy classes, and it's the one that describes every individual policy item. it's basically the master doc, the blueprint, the it-girl π
heads up bestie: the Base policy is not used directly. you're supposed to use a policy class derived from it. don't date the base class, date its children π
π POLICY CLASSES π
three policy classes ship with DBD::Gofer:
DBD::Gofer::Policy::pedanticβ the most 'transparent' one, but also the slowest, because it makes more round-trips to the Gofer server. honest, thorough, high maintenance πDBD::Gofer::Policy::classicβ a reasonable compromise, and it's the default policy. the reliable bestie. the one you actually text back πDBD::Gofer::Policy::rushβ fastest, but it may require code changes in your applications. speed demon, zero chill π₯
generally the default "classic" policy is fine. but when you're first testing an existing application with Gofer, it's a good idea to start with the "pedantic" policy first, and then switch to "classic" or a custom policy for your final testing. start cautious, then let loose π
π§ POLICY ITEMS π§
okay so these are temporary docs. the actual list of policies and their defaults? see the source code. that's the vibe, i don't make the rules π
in a future version the policies and their defaults will be defined in the pod and parsed out at load-time. so like, someday this section will eat. today it does not.
see the source code to this module for more details. fr fr, go read it.
π POLICY CUSTOMIZATION π
XXXthis area ofDBD::Goferis subject to change. so like, don't get too attached, bestie. it's giving unstable situationship.
there are three ways to customize policies:
- policy classes are designed to influence the overall behaviour of
DBD::Goferwith existing, unaltered programs, so they work in a reasonably optimal way without requiring code changes. you can implement new policy classes as subclasses of existing policies. inherit and elevate, periodt β¨ - in many cases individual policy items can be overridden on a case-by-case basis within your application code. you do this by passing a corresponding
"<go_<policy_name">>attribute into DBI methods by your application code. this lets you fine-tune the behaviour for special cases. the way that you can just scoop in and adjust one little thing π - the policy items are implemented as methods. in many cases the methods are passed parameters relating to the
DBD::Gofercode being executed. this means the policy can implement dynamic behaviour that varies depending on the particular circumstances, such as the particular statement being executed. so the policy literally adapts based on what's going on. main character energy, honestly π
π AUTHOR π
Tim Bunce, <http://www.tim.bunce.name>
β LICENCE AND COPYRIGHT β
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.
okay that's the whole page, no notes, you ate that π this was pulled from perl v5.42.3, dated 2026-10-19, and filed under DBD::Go...y::Base(3) β yes the filename got trimmed like a bad bob haircut, but the content is all there, i promise. go forth and policy responsibly, bestie π¦πΈπ
π¦ where this page comes from
- fedora 43: perl-DBI 1.656-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-DBI 1.656-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms