On Thu, Nov 29, 2012 at 10:15:19PM +0100, Jens Rehsack wrote: > > But back to the issue - now it seems dbm_tables is fetched earlier > in some cases than f_dir which causes an invocation of > DBI::DBD::SqlEngine::Table::get_table_meta (including > DBI::DBD::SqlEngine::Table::bootstrap_table_meta) before f_dir > has been set. This causes $dbh->{sql_meta}->{fred}->{f_dir} being > initialized to the default value of $dbh->{f_dir} which is > always cur_dir(). > > Looking into DBI::DBD::SqlEngine::dr::connect around line 180 > it could be seen that there's already some magic for "some > settings must be done before others". > > A quick fix for "now" could be: keys: ("sql_meta", $dbh->{dbm_meta}, > ...) must be initialized last - after any other k/v pair from %$attrs. > Another quick should could be forbid setting meta info during connect(), > as it's documented - but this would be a hugh step backwards in my > effort making DBI::DBD::SqlEngine and derived DBD's usable through > Gofer proxy. So I'd prefer the first quick shot ... > > For longer way, I'd like to refactor the order procedure to a > more flexible way: > $dbh->{dbd_init_order} = [ > [qw(Profile RaiseError PrintError AutoCommit)], > [qw(ReadOnly ...)], > ... > [qw(sql_meta dbm_tables ...)] > ]; > > Remaining question in that proposal: where's the fence between "must > be last" and "insert unnamed attrs here"?
I don't know, but I would like a working DBI for 5.17.6+ before too long. Tim.