Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

Virtual DB Users

posted by Krow on 02:14 PM February 27th, 2002   Printer-friendly   Email story
How do you easily *add* a new user to DBIx::Password ? I know perl and I just edited the perl module but that isn't fair for beginners. Is it in a manual somewhere? It isn't in the recent O'Reilly book as far as I can see. Do you just rebuild the file from scratch each time with perl Makefile.pl; make; make test; make install
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • There are a couple of ways to do it. Personally I just edit Password.pm. You can though rerun perl Makefile.pl. As long as you still have the directory sitting around that you used in the first place it will ask you if you want to keep the original definitions.

    Somewhere in the back of my mind is a "check to see if they have Tk and let them edit it from a gui" but that is an extremely low priority. Patches happily accepted for this though :)
    --

    --
    You can't grep a dead tree.
    • Currently the info is stored in a hash in the Password.pm This password is created and hardcoded into Password.pm during maketime. I tend to think this is a bad idea, having to change a library file just to modify configuration data. (I imagine you would agree, Krow).

      How about getting Password.pm to read in a passwords file in a fixed location (/etc/...) or, if a $filename parameter is passed to ::new($filename) then load config data from that $filename instead?

      Should only be a short code job ;)
      • Yes and no.
        I use DBIx::Password on platforms that do not have a /etc :)

        One of the thoughts in the back my head now for sometime has been modify it to do the same thing CPAN does, aka keep it in site_perl but not in the actuall Password.pm file. I would happily take a patch for this.

        The other option is to have it look up ~/.dbixpasswd files from user's accounts. Chromatic brought that one up with me and I agree that it would make for a nice addition.
        --

        --
        You can't grep a dead tree.