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 πŸ’…

XXX this area of DBD::Gofer is subject to change. so like, don't get too attached, bestie. it's giving unstable situationship.

there are three ways to customize policies:

  1. policy classes are designed to influence the overall behaviour of DBD::Gofer with 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 ✨
  2. 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 😌
  3. the policy items are implemented as methods. in many cases the methods are passed parameters relating to the DBD::Gofer code 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>


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