YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* デバッグ [#q31e255e]
** SQLのダンプ [#b7d3beff]
シェルで下のように設定してミニサーバを起動するとSQLがダン...
export DBIC_TRACE=1
もしくはアクションクラスの中などで以下のようにデバッグフ...
$c->model('MyappDB')->storage->debug(1);
$c->model('MyappDB')->storage->debugcb(
sub {
my ($op, $info) = @_;
$c->log->debug($info);
}
);
*** 参考 [#x8c7fe9a]
- http://blog.woremacx.com/2006/12/log-dbic-sql.html
- http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/M...
** Data::Dumperプラグイン [#s51b41c2]
[[Catalyst-Plugin-Dumper>http://search.cpan.org/~chisel/C...
use Catalyst qw/-Debug Dumper/;
$c->log->dumper($myvar);
$c->log->dumper($myvar, 'mylabel');
終了行:
* デバッグ [#q31e255e]
** SQLのダンプ [#b7d3beff]
シェルで下のように設定してミニサーバを起動するとSQLがダン...
export DBIC_TRACE=1
もしくはアクションクラスの中などで以下のようにデバッグフ...
$c->model('MyappDB')->storage->debug(1);
$c->model('MyappDB')->storage->debugcb(
sub {
my ($op, $info) = @_;
$c->log->debug($info);
}
);
*** 参考 [#x8c7fe9a]
- http://blog.woremacx.com/2006/12/log-dbic-sql.html
- http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/M...
** Data::Dumperプラグイン [#s51b41c2]
[[Catalyst-Plugin-Dumper>http://search.cpan.org/~chisel/C...
use Catalyst qw/-Debug Dumper/;
$c->log->dumper($myvar);
$c->log->dumper($myvar, 'mylabel');
ページ名: