Lazarus FireBird ZEOSDBO
分类:
2007-10-15 16:40:49
Added in DBI 1.49.
installed_versions
DBI->installed_versions; @ary = DBI->installed_versions; %hash = DBI->installed_versions;
Calls available_drivers() and attempts to load each of them in turn using install_driver(). For each load that succeeds the driver name and version number are added to a hash. When running under drivers which appear not be pure-perl are ignored.
When called in array context the list of successfully loaded drivers is returned (without the 'DBD::' prefix).
When called in scalar context a reference to the hash is returned and the hash will also contain other entries for the DBI
version, OS
name, etc.
When called in a void context the installed_versions() method will print out a formatted list of the hash contents, one per line.
Due to the potentially high memory cost and unknown risks of loading in an unknown number of drivers that just happen to be installed on the system, this method is not recommended for general use. Use available_drivers() instead.
The installed_versions() method is primarily intended as a quick way to see from the command line what's installed. For example:
perl -MDBI -e 'DBI->installed_versions'
The installed_versions() method was added in DBI 1.38.