Chinaunix首页 | 论坛 | 博客
  • 博客访问: 238856
  • 博文数量: 49
  • 博客积分: 4036
  • 博客等级: 上校
  • 技术积分: 470
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-12 09:16
个人简介

Lazarus FireBird ZEOSDBO

文章分类

全部博文(49)

文章存档

2017年(1)

2015年(1)

2010年(3)

2009年(3)

2008年(19)

2007年(22)

我的朋友
最近访客

分类:

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.

阅读(1306) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~