[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What config file for a .pm perl module ?

On Sat, Dec 29, 2001 at 03:53:19PM +1100, Craig Sanders wrote:
> On Fri, Dec 28, 2001 at 01:11:15PM +0100, Eric Van Buggenhaut wrote:
> > 	print Dumper($virtula1);
> > 


> which is pretty much the structure you wanted.
> other comments:
> i still think you should use a field separator which isn't in the field
> contents - much simpler, and far less prone to error.

I don't know about this, for example the user might supply a password
that indeed contains "|" and we don't know about this. My opinion  was
that chances are reduced to have a clash between fields and fields
separators if we actually use a '2-characters' separator (':) in the
case of fields containing aleatory characters.

I don't know much about fields and fields separators though. I guess
there exist theories about how it should be built depending on the
contents of the fields and probably people have written about that. If
you have any pointer to documentation ... ;-)


> also, why have the connect string at all when it can be built up from
> the details provided in the other fields?  it seems to me that the
> fields you need are:
>  username
>  dbi_driver
>  attributes
>  db_name
>  db_host
>  db_port
>  db_user
>  db_password
> the connect string can be built up like so:
> 	$connect = "DBI:$driver:database=$db_name:host=$db_host" ;
> (using db_port, db_user, and db_password as well if required)

Oh yes, that might be a good idea


Eric VAN BUGGENHAUT     "Hay tampones y tampones..." (Eva Serrano)
        \_|_/           Av. Santa Engracia, 54
       \/   \/          E-28010 Madrid - tfno:+34(91)2041100
a n d a g o  |--        http://www.andago.com
       /\___/\ 		"Innovando en Internet"
        / | \           eric@andago.com

Reply to: