On Fri, Feb 16, 2007 at 02:47:41AM -0800, Ask Bjorn Hansen wrote:
> Hi Tim (and everyone else),
> 
> A couple of questions regarding the Gofer transports:
> 
> The transports are configured with "url=" in the dsn.   "url" is  
> probably the most generic name for a "target", even if some  
> transports won't really be using URLs.   If the transports need more  
> configuration than a relatively simple text string, it will be a pain  
> though.

Currently any foo=bar in the dsn (or go_foo=>'bar' in the \%attr)
gets translated into:

    $transport->go_foo('bar')

(via the call to new(\%dsn_attr)) so the transport just needs to define
accessor method for the attribute.

The unresolved issue here is that some attributes may be for the
transport and some may be for DBD::Gofer itself. Ideally both should
define what attributes they can accept then the code can be smarter.
It's on my todo list.

> What's the plan for other people putting extra transports on CPAN?   
> DBD::Goferx:: ?   :-)  Speaking of that, when transports are  
> distributed independently, the lowercase transport name will start  
> looking goofy.

In the dsn transports can have short names

    dbi:Gofer:transport=foo;...

in which case the name is prefixed with "DBD::Gofer::Transport::",
or you can put a full module name in the dsn:

    dbi:Gofer:transport=My::GoferTrans::bar;...

That does look kind'a ugly, but it's not too bad.

I could make the short name do a lookup in both DBD::Gofer::Transport
and DBIx::Gofer::Transport.

> I was going to comment that there probably aren't  
> that many transports people can come up with, but we know how that goes.

:-)

For some reason I'm reminded of the days, long ago, when there were
ftp-by-email servers that you could email ftp file locations to and
they'd fetch the files and email them back to you as attachments[1].
DBD::Gofer::Transport::smtp anyone?

More seriously though, a Spread transport would be interesting
(http://www.spread.org/)

Tim.

[1] http://www.faqs.org/faqs/internet-services/access-via-email/

Reply via email to