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 the DBD::Gofer::Policy::Base manpage 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.
L<DBD::Gofer::Policy::rush> is fastest, but may require code changes in your applications.
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.
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.
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 let's you fine-tune the behaviour for special cases.
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.