DBIx::...yPrint(3pm)
π NAME π
DBIx::Class::Storage::Debug::PrettyPrint β it's giving Pretty Printing DebugObj β¨
okay so this is the page from DBIx::...yPrint(3pm) and bestie, it's short, it's sweet, it's lowkey iconic. let's go π«Ά
πΈ SYNOPSIS πΈ
the whole vibe is: you point an env var at a lil json file and let it cook π
DBIC_TRACE_PROFILE=~/dbic.json perl -Ilib ./foo.pl
and where dbic.json contains, literally:
{
"profile":"console",
"show_progress":1,
"squash_repeats":1
}
no cap, that's it. that's the config. π
π¦ METHODS π¦
β¨ new β¨
so you make one like this, and every single knob is right here:
my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({
show_progress => 1, # tries it's best to make it clear that a SQL
# statement is still running
executing => '...', # the string that is added to the end of SQL
# if show_progress is on. You probably don't
# need to set this
clear_line => '<CR><ESC>[J', # the string used to erase the string added
# to SQL if show_progress is on. Again, the
# default is probably good enough.
squash_repeats => 1, # set to true to make repeated SQL queries
# be ellided and only show the new bind params
# any other args are passed through directly to SQL::Abstract::Tree
});
let me break down the drama, bestie π
show_progress => 1β turns on the lil "still working on it" energy. it tries it's best to make it clear that a SQL statement is still running. main character behavior fr fr π₯executing => '...'β the string that is added to the end of SQL ifshow_progressis on. ngl you probably don't need to set this one, the default ate πclear_line => '<CR><ESC>[J'β the string used to erase the string added to SQL ifshow_progressis on. again, the default is probably good enough. don't overthink it π§squash_repeats => 1β set to true to make repeated SQL queries be ellided and only show the new bind params. obsessed, it's so much less spammy π- and every other arg? not me gatekeeping β they're passed through directly to
SQL::Abstract::Treeπ
lowkey important: those comments in the code block above are straight from the source, so keep the spelling as-is (ellided and all) β iykyk π
and that's the whole page, bestie. short king. π
this doc came from the perl v5.32.1 era, dated 2021-09-30, under the DBIx::...yPrint(3pm) manual β so if you're quoting it, that's the receipts β¨
periodt. go pretty-print some SQL π©·π¦π
π¦ where this page comes from
- debian bookworm: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsql-abstract-perl 2.000001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms