2004年06月28日 (月)
今日も Class::DBI のバージョン問題
あー。もー。。。。今日は、set_sql 関係。すぐ気が付いたけど、直すのがめんどくせー。。
class->set_sql('hoge', xxxxxxxx );
って設定すると
class->search_hoge
って出来るのは、最近のバージョンで、0.90とかだと出来ない。Class::DBIのバージョンを上げるのは鬼門なので、プログラム側で。
sub search_hoge {
my $class = shift;
my @bind = @_;
my $sth = $class->sql_hoge;
$sth->execute(@bind);
return $class->sth_to_objects($sth);
}
で対応した。めんどくせー。
posted by takefumi
|
この日記へリンク
|
コメント(0)
|
トラックバック(0)

