in reply to can one create a "session" of Perl & Mysql?

Um, wow, the responses are staggering

You do not need a daemon, connection pooling, a way to serialize DB connections, a master mysql account..

You needs a special text file called a configuration file, ex ~/.myopsprograminfochmod600, where your program writes the credentials you prompt the user for, thats it

  • Comment on Re: can one create a "session" of Perl & Mysql?

Replies are listed 'Best First'.
Re^2: can one create a "session" of Perl & Mysql?
by Anonymous Monk on Sep 26, 2018 at 14:54 UTC

    If you decide on a configuration file, you may want it encrypted. If you do, Config::Identity may be of help to you. I qualify the recommendation because:

    • You need a working GPG installation
    • It actually spawns a command to do the encryption, so your script needs to run in an environment where this is possible
    • It does not create the file, only read and decrypt it once created

    Should you decided to pursue this module, I found that I had to set environment variable CI_GPG to the path to gpg2, because by default the module prefers gpg.

Re^2: can one create a "session" of Perl & Mysql?
by Anonymous Monk on Sep 26, 2018 at 10:05 UTC
    Yeah... Thanks everyone for the suggestions, but I actually went for the "easy" fix here, to have a standard file that I can read the credentials from :)
Re^2: can one create a "session" of Perl & Mysql?
by bliako (Abbot) on Sep 26, 2018 at 12:57 UTC

    sure, we are all adults here so i wont spam-warn about the obvious.

      bliako : sure, we are all adults here so i wont spam-warn about the obvious. =~ s/adult/baby/

        personally, I was baptised before I talked...