summaryrefslogtreecommitdiff
path: root/posts/2008-06-21-debug-your-dbix-class-queries.md
blob: 4ab4ec6f59a22ed0058f142bfb2963a5e20c37be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
If you use DBIx::Class and want to see what the SQL generated looks like, you can set the environment variable **DBIC\_TRACE**.

``` bash
DBIC_TRACE=1 my_programme.pl
```

And all the SQL will be printed on **STDERR**.

If you give a filename to the variable, like this

``` bash
DBIC_TRACE="1=/tmp/sql.debug"
```

all the statements will be printed in this file.