Jeff Thies wrote:
>
> I'm manipulating passwords and virtmaps. DBI::AnyData is so much easier
> to write/maintain than the glob of Perl this replaces!
Great!
> One last question. How do I predefine column names as you have done in
> Passwd.pm
You have three options: 1) Define them on a per-table basis by putting
them as a space separated list as the first line in the file; or 2)
Define them on a per-table basis by feeding in a comma-separated list of
column names as the col_names flag:
$dbh->func( $table_name
, 'Vertmap'
, $file_name,
, { col_names => 'c1,c2' }
, 'ad_import'
);
or 3) Define them permanently in the subclassing package, just add a comma-separated
string like this to new():
$self->{col_names} = 'c1,c2';
> I tried adding: $flags->{col_names} = 'virtual_email,real_email';
In this case it should be $self->... not $flags->...
--
Jeff