| Use Case | Command / Code | Description |
|---|---|---|
| Connect with default policy | DBI->connect("dbi:Gofer:transport=...;policy=classic", ...) | Uses the "classic" policy – a reasonable compromise |
| Connect with pedantic policy | DBI->connect("dbi:Gofer:transport=...;policy=pedantic", ...) | Most transparent but slowest (more round-trips) |
| Connect with rush policy | DBI->connect("dbi:Gofer:transport=...;policy=rush", ...) | Fastest, may require code changes |
| Override a policy item dynamically | DBI->connect(..., { go_ => value }) | Fine-tune behaviour for special cases within application code |
DBD::Gofer::Policy::Base - Base class for DBD::Gofer policies
$dbh = DBI->connect("dbi:Gofer:transport=...;policy=...", ...)
DBD::Gofer can be configured via a 'policy' mechanism that allows you to fine-tune the number of round-trips to the Gofer server. The policies are grouped into classes (which may be subclassed) and referenced by the name of the class.
The DBD::Gofer::Policy::Base class is the base class for all the policy classes and describes all the individual policy items.
The Base policy is not used directly. You should use a policy class derived from it.
Three policy classes are supplied with DBD::Gofer:
Generally the default "classic" policy is fine. When first testing an existing application with Gofer it is a good idea to start with the "pedantic" policy first and then switch to "classic" or a custom policy, for final testing.
These are temporary docs: See the source code for list of policies and their defaults.
In a future version the policies and their defaults will be defined in the pod and parsed out at load-time.
See the source code to this module for more details.
XXX This area of DBD::Gofer is subject to change.
There are three ways to customize policies:
<go_<policy_name>> attribute into DBI methods by your application code. This lets you fine-tune the behaviour for special cases.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.
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-30 23:57 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format