DBD-mysql version

DBD-mysql version

am 17.11.2004 14:26:42 von Daniel Kasak

Hi all.

How can I get information about the current version of DBD-mysql?
I'm writing a module that needs to know this to figure out which
features are available, at run-time.

Dan

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD-mysql version

am 17.11.2004 14:34:16 von Paul DuBois

At 0:26 +1100 11/18/04, Daniel Kasak wrote:
>Hi all.
>
>How can I get information about the current version of DBD-mysql?
>I'm writing a module that needs to know this to figure out which
>features are available, at run-time.
>
>Dan

#! /usr/bin/perl -w
# dbi-version.pl - display DBI and DBD::mysql versions
use strict;
use DBI;
print "DBI::VERSION: $DBI::VERSION\n";
use DBD::mysql;
print "DBD::mysql::VERSION: " . $DBD::mysql::VERSION . "\n";

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD-mysql version

am 17.11.2004 22:01:47 von Daniel Kasak

------------=_1100725393-13089-26
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Paul DuBois wrote:

> At 0:26 +1100 11/18/04, Daniel Kasak wrote:
>
>> Hi all.
>>
>> How can I get information about the current version of DBD-mysql?
>> I'm writing a module that needs to know this to figure out which
>> features are available, at run-time.
>>
>> Dan
>
>
> #! /usr/bin/perl -w
> # dbi-version.pl - display DBI and DBD::mysql versions
> use strict;
> use DBI;
> print "DBI::VERSION: $DBI::VERSION\n";
> use DBD::mysql;
> print "DBD::mysql::VERSION: " . $DBD::mysql::VERSION . "\n";

Thanks :)

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au


------------=_1100725393-13089-26
Content-Type: text/plain; charset=us-ascii

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
------------=_1100725393-13089-26--

Re: DBD-mysql version

am 18.11.2004 09:08:39 von Peter Pentchev

--MnLPg7ZWsaic7Fhd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 18, 2004 at 08:01:47AM +1100, Daniel Kasak wrote:
> Paul DuBois wrote:
>=20
> >At 0:26 +1100 11/18/04, Daniel Kasak wrote:
> >
> >>Hi all.
> >>
> >>How can I get information about the current version of DBD-mysql?
> >>I'm writing a module that needs to know this to figure out which=20
> >>features are available, at run-time.
> >>
> >>Dan
> >
> >
> >#! /usr/bin/perl -w
> ># dbi-version.pl - display DBI and DBD::mysql versions
> >use strict;
> >use DBI;
> >print "DBI::VERSION: $DBI::VERSION\n";
> >use DBD::mysql;
> >print "DBD::mysql::VERSION: " . $DBD::mysql::VERSION . "\n";
>=20
> Thanks :)

By the way, if for some reason you do not want to use/require the
DBD::mysql module (like suspecting that it might not be installed yet),
you could also try the following:

#!/usr/bin/perl -w

use strict;

use ExtUtils::Installed;

my $inst =3D ExtUtils::Installed->new();
my $dbiver =3D $inst->version("DBI");
my $mysqlver =3D $inst->version("DBD::mysql");

print "DBI version $dbiver\n" if $dbiver;
print "DBD::mysql version $mysqlver\n" if $mysqlver;

Note that ExtUtils::Installed does not play nice with taint mode...

G'luck,
Peter

--=20
Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
What would this sentence be like if pi were 3?

--MnLPg7ZWsaic7Fhd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBnFiH7Ri2jRYZRVMRAhE2AKCnIBgablhYbOzBLhGjzqv9Z5B16wCf W89o
srS5FGx+Gk1Rsc3oWFGoNCU=
=2mDu
-----END PGP SIGNATURE-----

--MnLPg7ZWsaic7Fhd--