{
    "mode": "perldoc",
    "parameter": "DBD::Gofer::Transport::Base",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AGofer%3A%3ATransport%3A%3ABase/json",
    "generated": "2026-06-11T10:10:53Z",
    "synopsis": "my $remotedsn = \"...\"\nDBI->connect(\"dbi:Gofer:transport=...;url=...;timeout=...;retrylimit=...;dsn=$remotedsn\",...)\nor, enable by setting the DBIAUTOPROXY environment variable:\nexport DBIAUTOPROXY='dbi:Gofer:transport=...;url=...'\nwhich will force *all* DBI connections to be made via that Gofer server.",
    "sections": {
        "NAME": {
            "content": "DBD::Gofer::Transport::Base - base class for DBD::Gofer client transports\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $remotedsn = \"...\"\nDBI->connect(\"dbi:Gofer:transport=...;url=...;timeout=...;retrylimit=...;dsn=$remotedsn\",...)\n\nor, enable by setting the DBIAUTOPROXY environment variable:\n\nexport DBIAUTOPROXY='dbi:Gofer:transport=...;url=...'\n\nwhich will force *all* DBI connections to be made via that Gofer server.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is the base class for all DBD::Gofer client transports.\n",
            "subsections": []
        },
        "ATTRIBUTES": {
            "content": "Gofer transport attributes can be specified either in the attributes parameter of the connect()\nmethod call, or in the DSN string. When used in the DSN string, attribute names don't have the\n\"go\" prefix.\n\ngodsn\nThe full DBI DSN that the Gofer server should connect to on your behalf.\n\nWhen used in the DSN it must be the last element in the DSN string.\n\ngotimeout\nA time limit for sending a request and receiving a response. Some drivers may implement sending\nand receiving as separate steps, in which case (currently) the timeout applies to each\nseparately.\n\nIf a request needs to be resent then the timeout is restarted for each sending of a request and\nreceiving of a response.\n\ngoretrylimit\nThe maximum number of times an request may be retried. The default is 2.\n\ngoretryhook\nThis subroutine reference is called, if defined, for each response received where $response->err\nis true.\n\nThe subroutine is pass three parameters: the request object, the response object, and the\ntransport object.\n\nIf it returns an undefined value then the default retry behaviour is used. See \"RETRY ON ERROR\"\nbelow.\n\nIf it returns a defined but false value then the request is not resent.\n\nIf it returns true value then the request is resent, so long as the number of retries does not\nexceed \"goretrylimit\".\n",
            "subsections": []
        },
        "RETRY ON ERROR": {
            "content": "The default retry on error behaviour is:\n\n- Retry if the error was due to DBIGOFERRANDOM. See L<DBI::Gofer::Execute>.\n\n- Retry if $request->isidempotent returns true. See L<DBI::Gofer::Request>.\n\nA retry won't be allowed if the number of previous retries has reached \"goretrylimit\".\n",
            "subsections": []
        },
        "TRACING": {
            "content": "Tracing of gofer requests and responses can be enabled by setting the \"DBDGOFERTRACE\"\nenvironment variable. A value of 1 gives a reasonably compact summary of each request and\nresponse. A value of 2 or more gives a detailed, and voluminous, dump.\n\nThe trace is written using DBI->tracemsg() and so is written to the default DBI trace output,\nwhich is usually STDERR.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "*This section is currently far from complete.*\n\nresponseretrypreference\n$retry = $transport->responseretrypreference($request, $response);\n\nThe responseretrypreference is called by DBD::Gofer when considering if a request should be\nretried after an error.\n\nReturns true (would like to retry), false (must not retry), undef (no preference).\n\nIf a true value is returned in the form of a CODE ref then, if DBD::Gofer does decide to retry\nthe request, it calls the code ref passing $retrycount, $retrylimit. Can be used for logging\nand/or to implement exponential backoff behaviour. Currently the called code must return using\n\"return;\" to allow for future extensions.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Tim Bunce, <http://www.tim.bunce.name>\n",
            "subsections": []
        },
        "LICENCE AND COPYRIGHT": {
            "content": "Copyright (c) 2007-2008, Tim Bunce, Ireland. All rights reserved.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See perlartistic.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "DBD::Gofer, DBI::Gofer::Request, DBI::Gofer::Response, DBI::Gofer::Execute.\n\nand some example transports:\n\nDBD::Gofer::Transport::stream\n\nDBD::Gofer::Transport::http\n\nDBI::Gofer::Transport::modperl\n",
            "subsections": []
        }
    },
    "summary": "DBD::Gofer::Transport::Base - base class for DBD::Gofer client transports",
    "flags": [],
    "examples": [],
    "see_also": []
}