try DBIC colorizer!
Arthur Axel "fREW" Schmidt [Sat, 23 Oct 2010 21:04:36 +0000 (21:04 +0000)]
examples/dbic-console.pl [new file with mode: 0644]

diff --git a/examples/dbic-console.pl b/examples/dbic-console.pl
new file mode 100644 (file)
index 0000000..dc3b19c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/sur/bin/env perl
+
+use DBIx::Class::Storage::Debug::PrettyPrint;
+
+my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({
+   profile => 'console',
+   show_progress => 0,
+});
+
+$pp->txn_begin;
+$pp->query_start("SELECT a, b, c FROM foo WHERE foo.a =1 and foo.b LIKE ?", q('station'));
+sleep 1;
+$pp->query_end("SELECT a, b, c FROM foo WHERE foo.a =1 and foo.b LIKE ?", q('station'));
+$pp->txn_commit;
+