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

2002-01-02 Thread Peter Makholm
Eric Van Buggenhaut <[EMAIL PROTECTED]> writes: > The upstream code requires the administrator to introduce the user > data (username, password, port, database, etc.) in the same Password.pm file, > which looks horrible to me. Ok, we've seen some solutions but the real problem remains: The perl m

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

2001-12-31 Thread Eric Van Buggenhaut
On Fri, Dec 28, 2001 at 11:16:03AM -0600, Colin Watson wrote: > On Fri, Dec 28, 2001 at 03:02:29PM +0100, Eric Van Buggenhaut wrote: > > my %virtual1 = {}; > [...] > > $virtual1->{$user[0]}->{$fields[$_]} = $user[$_]; > [...] > > When running the script using this module, I get this

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

2001-12-31 Thread Eric Van Buggenhaut
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 s

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

2001-12-28 Thread Craig Sanders
On Fri, Dec 28, 2001 at 01:11:15PM +0100, Eric Van Buggenhaut wrote: > print Dumper($virtula1); > > I spent some time try to understand why it was failing ;) oops. yeah. i should have cut-and-pasted the script i got working in /tmp instead of what i originally typed in the message. there

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

2001-12-28 Thread Colin Watson
On Fri, Dec 28, 2001 at 03:02:29PM +0100, Eric Van Buggenhaut wrote: > my %virtual1 = {}; [...] > $virtual1->{$user[0]}->{$fields[$_]} = $user[$_]; [...] > When running the script using this module, I get this error: > > mrmime_SLASH:/# install-slashsite > Global symbol "$virtual1"

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

2001-12-28 Thread Eric Van Buggenhaut
On Fri, Dec 28, 2001 at 10:31:01AM +1100, Craig Sanders wrote: > On Thu, Dec 27, 2001 at 07:03:38PM +0100, Eric Van Buggenhaut wrote: [...] > > you can verify that this does what you want by using the Data::Dumper > module. e.g. by adding something like the following lines to the script: > >

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

2001-12-28 Thread Eric Van Buggenhaut
On Thu, Dec 27, 2001 at 10:53:24AM -0500, [EMAIL PROTECTED] wrote: > On Thu, Dec 27, 2001 at 11:49:12PM +0800, James Bromberger wrote: > > On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: > > > > > My own approach? Write your own parser for a simple 'key = value' style > > > confi

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

2001-12-28 Thread Eric Van Buggenhaut
On Fri, Dec 28, 2001 at 10:31:01AM +1100, Craig Sanders wrote: > On Thu, Dec 27, 2001 at 07:03:38PM +0100, Eric Van Buggenhaut wrote: [...] > > my %virtual1 = {}; > > while (<>) { > chomp ; > s/#.*//; # strip comments > s/^\s*|\s*$//g; # stri

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

2001-12-27 Thread Darren Salt
I demand that Eric Van Buggenhaut may or may not have written... > On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: [snip] > #!/usr/bin/perl -w > #open (IN,"/etc/dbix-password.conf"); > open (IN,"dbix-password.conf"); > while () { > next if (/^#/ || /^$/); > @host

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

2001-12-27 Thread Craig Sanders
On Thu, Dec 27, 2001 at 07:03:38PM +0100, Eric Van Buggenhaut wrote: > I wanted to be able to use a config file similar to /etc/passwd like: > > #This is the list of users needed by DBIx::Password > #(/usr/lib/perl5/DBIx/Password.pm) > # > #Syntax is: > #host:username:password:port:database:attrib

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

2001-12-27 Thread Eric Van Buggenhaut
On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: > On Thu, Dec 27, 2001 at 02:18:15PM +0100, Eric Van Buggenhaut wrote: > > Hi, > > > I'm currently packaging libdbix-password-perl. > > > The upstream code requires the administrator to introduce the user > > data (username, password

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

2001-12-27 Thread Sean Dague
On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: > My own approach? Write your own parser for a simple 'key = value' style > config file. This can usually be done in ten lines or less[1] using > perl's powerful regexp engine. Why not just 'apt-get install libappconfig-perl', then

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

2001-12-27 Thread cfm
On Thu, Dec 27, 2001 at 11:49:12PM +0800, James Bromberger wrote: > On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: > > > My own approach? Write your own parser for a simple 'key = value' style > > config file. This can usually be done in ten lines or less[1] using > > perl's po

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

2001-12-27 Thread James Bromberger
On Thu, Dec 27, 2001 at 09:19:16AM -0600, Steve Langasek wrote: > My own approach? Write your own parser for a simple 'key = value' style > config file. This can usually be done in ten lines or less[1] using > perl's powerful regexp engine. > [1] depending, of course, on your standards for co

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

2001-12-27 Thread Steve Langasek
On Thu, Dec 27, 2001 at 02:18:15PM +0100, Eric Van Buggenhaut wrote: > Hi, > I'm currently packaging libdbix-password-perl. > The upstream code requires the administrator to introduce the user > data (username, password, port, database, etc.) in the same Password.pm file, > which looks horrible t

What config file for a .pm perl module ?

2001-12-27 Thread Eric Van Buggenhaut
Hi, I'm currently packaging libdbix-password-perl. The upstream code requires the administrator to introduce the user data (username, password, port, database, etc.) in the same Password.pm file, which looks horrible to me. So my idea is to create a config file in /etc sourced by the module. I h