.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBD::Gofer::Transport::stream 3pm" .TH DBD::Gofer::Transport::stream 3pm "2022-11-19" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBD::Gofer::Transport::stream \- DBD::Gofer transport for stdio streaming .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& DBI\->connect(\*(Aqdbi:Gofer:transport=stream;url=ssh:username@host.example.com;dsn=dbi:...\*(Aq,...) .Ve .PP or, enable by setting the \s-1DBI_AUTOPROXY\s0 environment variable: .PP .Vb 1 \& export DBI_AUTOPROXY=\*(Aqdbi:Gofer:transport=stream;url=ssh:username@host.example.com\*(Aq .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Without the \f(CW\*(C`url=\*(C'\fR parameter it launches a subprocess as .PP .Vb 1 \& perl \-MDBI::Gofer::Transport::stream \-e run_stdio_hex .Ve .PP and feeds requests into it and reads responses from it. But that's not very useful. .PP With a \f(CW\*(C`url=ssh:username@host.example.com\*(C'\fR parameter it uses ssh to launch the subprocess on a remote system. That's much more useful! .PP It gives you secure remote access to \s-1DBI\s0 databases on any system you can login to. Using ssh also gives you optional compression and many other features (see the ssh manual for how to configure that and many other options via ~/.ssh/config file). .PP The actual command invoked is something like: .PP .Vb 1 \& ssh \-xq ssh:username@host.example.com bash \-c $setup $run .Ve .PP where \f(CW$run\fR is the command shown above, and \f(CW$command\fR is .PP .Vb 1 \& . .bash_profile 2>/dev/null || . .bash_login 2>/dev/null || . .profile 2>/dev/null; exec "$@" .Ve .PP which is trying (in a limited and fairly unportable way) to setup the environment (\s-1PATH, PERL5LIB\s0 etc) as it would be if you had logged in to that system. .PP The "\f(CW\*(C`perl\*(C'\fR" used in the command will default to the value of $^X when not using ssh. On most systems that's the full path to the perl that's currently executing. .SH "PERSISTENCE" .IX Header "PERSISTENCE" Currently gofer stream connections persist (remain connected) after all database handles have been disconnected. This makes later connections in the same process very fast. .PP Currently up to 5 different gofer stream connections (based on url) can persist. If more than 5 are in the cache when a new connection is made then the cache is cleared before adding the new connection. Simple but effective. .SH "TO DO" .IX Header "TO DO" Document go_perl attribute .PP Automatically reconnect (within reason) if there's a transport error. .PP Decide on default for persistent connection \- on or off? limits? ttl? .SH "AUTHOR" .IX Header "AUTHOR" Tim Bunce, .SH "LICENCE AND COPYRIGHT" .IX Header "LICENCE AND COPYRIGHT" Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. .SH "SEE ALSO" .IX Header "SEE ALSO" DBD::Gofer::Transport::Base .PP DBD::Gofer