http://www.perlmonks.org?node_id=980269


in reply to Re^3: Install problems with DBD::InterBase
in thread Install problems with DBD::InterBase

Hi Moritz,

Thanks for this. Well I can see:

If omitted, $user defaults to the ISC_USER environment variable (or, failing that, the DBI-standard DBI_USER environment variable). Similarly, $password defaults to ISC_PASSWORD (or DBI_PASS). If $dbname is blank, that is, "dbi:Firebird:dbname=", the environment variable ISC_DATABASE is substituted.

For using with the connect statement, but I don't see anything for using with install and it's cpan -i DBD::Firebird which is falling over not the connect statement.

But it's true that cpan -i DBD::InterBase asks a lot of questions, the answers to which it presumably put into environment vars, and you might expect DBD::Firebird to need the same info. Am I missing something?

Thanks again for your help.

Regards

Steve

Replies are listed 'Best First'.
Re^5: Install problems with DBD::InterBase
by stefbv (Curate) on Jul 06, 2012 at 14:40 UTC

    Better download the module, unpack and you can use:

    perl Makefile.PL -i

    to interactively configure the installation.

      Hi Stefbv,

      Firstly, I never knew about perl Makefile.PL -i, that was really very helpful. Does it work on all Makefile.PLs? I'll check.

      Well, I got it installed with a few tweaks, I'm not sure whether these were right or not, however, it seems to be working.

      This is what happened:

      perl Makefile.PL -i Configuring DBD::Firebird (on linux) libfbembed.so found in /usr/lib/../lib This script prepares the installation of the DBD::Firebird module. Warning: the process will create a temporary file to store the values required for the testing phase, including the password for access to the Firebird server in plain text: 't/tests-setup.tmp.conf'. Reading cached test configuration... Starting interactive setup, two attempts for each option, if both fail, the script will abort ... Enter the full paths to the Firebird instalation: Home: [/usr] /usr/lib/firebird/2.1/bin Include: [/usr/include] Lib: [/usr/lib] Configuring the test environment ... Hostname: [localhost] Enter the full path and file name of the test database (.fdb): Test DB: [/tmp/dbd-fb-testdb.fdb] Enter authentication options: Username: [SYSDBA] <user> Password: [masterkey] <password> Multiple copies of Driver.xst found in: /usr/local/lib/perl/5.12.4/aut +o/DBI/ /usr/lib/perl5/auto/DBI/ at Makefile.PL line 190 Using DBI 1.609 (for perl 5.012004 on x86_64-linux-gnu-thread-multi) i +nstalled in /usr/local/lib/perl/5.12.4/auto/DBI/ Multiple copies of Driver.xst found in: /usr/local/lib/perl/5.12.4/aut +o/DBI/ /usr/lib/perl5/auto/DBI/ at Makefile.PL line 193 Found libfbembed, will build DBD::FirebirdEmbed too. Configuring DBD::FirebirdEmbedded (on linux) FIREBIRD_HOME : /usr/lib/firebird/2.1/bin FIREBIRD_INCLUDE: /usr/include FIREBIRD_LIB : /usr/lib Client library : fbembed Writing Makefile for DBD::FirebirdEmbedded Writing MYMETA.yml and MYMETA.json Writing Makefile for DBD::Firebird Writing MYMETA.yml and MYMETA.json

      My first question was that it wasn't intuitive that the first answer was '/usr/lib/firebird/2.1/bin', however as that is what I use for DBD:InterBase, I used it.

      Secondly, it couldn't find my actual database when specified, so I used the test one defaulted and everything worked.

      Update:I meant to add that make test also failed so I did nto run it on the last occassion and went straight from make to make install. This worked and the resulting code also seems to work, although I guess there will be some glitches if I use the code that failed.

      Then changing the DSN itself was child's play and everything sprung into life.

      So thanks again.

      Regards

      Steve

        Hello Steve,

        DBD::Firebird is based on DBD::InterBase, the interactive configuration feature was a default in DBD::InterBase and we chose to keep it as an option.

        For "the full path to the Firebird installation" the FIREBIRD_HOME environment variable is checked first, on failure, a sub tries to locate Firebird in some default paths, but "/usr/lib/firebird/2.1" is not among them, that's why you had to enter the correct path. By the way what OS is yours? (if GNU/Linux then what distribution?, because other search paths can be easily added).

        Suppose the test that failed is rt72946.t (it's a known bug) or where other test that failed?, unfortunately there is another bug, recently discovered, see https://github.com/mariuz/perl-dbd-firebird/.

        Regards, Stefan