日向夏特殊応援部隊

俺様向けメモ

DBI-1.55は結構良さそう

DBI::Changes - List of significant changes to the DBI - metacpan.orgによれば、
今回は結構意欲的なバージョンアップのようですね。

パフォーマンス面

  1. Changed some handle creation code from perl to C code, to reduce handle creation cost by ~20%.
  2. Changed connect_cached and prepare_cached to avoid a FETCH method call, and thereby reduced cost by ~5% and ~30% respectively.

handleを生成するコードがperllからCになって、速くなったみたいですね。
それとconnect_cached, prepared_cachedも改善してるみたいです。*1

機能面

  1. Added more functionality to the (undocumented) Callback mechanism. Callbacks can now elect to provide a value to be returned, in which case the method won't be called. A callback for "*" is applied to all methods that don't have their own callback.
  2. Added $h->{ReadOnly} attribute.


callbackが実装されたみたいですね。面白そう。
ReadOnlyって言う属性も追加されたみたい。slaveなんかには敢えて立てておいた方が安全ですね。*2

*1:最もこのメソッドを使う事の是非は色々議論されてるみたいですけど

*2:最もslave用ユーザーに権限与えなければいいんですけど、念のため