On Tue, 11 Jun 2013 10:52:47 +0100, Chris Randall
<chrisrandal...@gmail.com> wrote:

> Thanks for the response.
> 
> No it's not what I'm after -- luckily I only have two locations, so I can
> work around it by having two db handles.

FWIW we discussed the feature request and I implemented a rough
approach that has to be smoothed out and tested and documented before
it will be accepted, but if things go well, DBD::File will support a
new attribute "f_dir_search" in one of the next releases.

my $dbh = DBI->connect ("dbi:CSV:", undef, undef, {
    f_schema         => undef,
    f_dir            => "tmp",
    f_dir_search     => [ "sandbox", "/tmp" ],
    f_ext            => ".csv/r",
    f_lock           => 2,
    f_encoding       => "utf8",

    RaiseError       => 1,
    PrintError       => 1,
    FetchHashKeyName => "NAME_lc",
    }) or die "$DBI::errstr\n";

f_dir will be the main folder, where newly created tables will be
placed, but for opening existing tables, one can use f_dir_search to
specify additional locations. I think that would accommodate your
request

> On Tue, Jun 11, 2013 at 10:50 AM, H.Merijn Brand <h.m.br...@xs4all.nl>wrote:
> 
> > On Tue, 11 Jun 2013 10:23:20 +0100, Chris Randall
> > <chrisrandal...@gmail.com> wrote:
> >
> > > Hi:
> >
> > > I am using the perl module to manipulate CSV files and I'd like to be able
> > > to keep my CSV in more that one directory, I've tried have multiple 
> > > entries
> > > in the f_dir field of connect, separated by ; or , or : -- but to no avail
> > > :-( Is it possible to do this?
> >
> > Not at the moment, unless you would specify the exact location per
> > table, which is obviously not what you are aiming at.
> >
> > Thanks for the idea, worth working out
> >
> > > Thanks in advance for your help.
> > >
> > > Chris.

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to