DBICDUMP(1)
π DBICDUMP β the manual, but make it cute π
okay bestie, so this is the dbicdump page from the User Contributed Perl Documentation section, and I am so excited to walk you through it. it dumps schemas. it's iconic. let's go π¦
β¨ NAME β¨
dbicdump β dump a schema using DBIx::Class::Schema::Loader π
πΈ SYNOPSIS πΈ
here's the shape of it, no cap:
dbicdump <configuration_file>
dbicdump [-I <lib-path>] [-o <loader_option>=<value> ] \
<schema_class> <connect_info>
π Examples π
these are the actual real examples, copy them exactly bestie:
$ dbicdump schema.conf
$ dbicdump -o dump_directory=./lib \
-o components='["InflateColumn::DateTime"]' \
MyApp::Schema dbi:SQLite:./foo.db
$ dbicdump -o dump_directory=./lib \
-o components='["InflateColumn::DateTime"]' \
MyApp::Schema dbi:SQLite:./foo.db '{ quote_char => "\"" }'
$ dbicdump -Ilib -o dump_directory=./lib \
-o components='["InflateColumn::DateTime"]' \
-o preserve_case=1 \
MyApp::Schema dbi:mysql:database=foo user pass \
'{ quote_char => "`" }'
$ dbicdump -o dump_directory=./lib \
-o components='["InflateColumn::DateTime"]' \
MyApp::Schema 'dbi:mysql:database=foo;host=domain.tld;port=3306' \
user pass
and on Windows that whole vibe looks like this instead:
$ dbicdump -o dump_directory=.\lib ^
-o components="[q{InflateColumn::DateTime}]" ^
-o preserve_case=1 ^
MyApp::Schema dbi:mysql:database=foo user pass ^
"{ quote_char => q{`} }"
π§ config files π§
so, configuration files must have schema_class and connect_info sections β that's not optional, that's the rules. here's an example of a general config file, literally:
schema_class MyApp::Schema
lib /extra/perl/libs
# connection string
<connect_info>
dsn dbi:mysql:example
user root
pass secret
</connect_info>
# dbic loader options
<loader_options>
dump_directory ./lib
components InflateColumn::DateTime
components TimeStamp
</loader_options>
π«Ά heads up: using a config file requiresConfig::Anyinstalled. noConfig::Any, no config file. them's the breaks.
also the optional lib key? it's equivalent to the -I option. same energy, different outfit β¨
π DESCRIPTION π
dbicdump generates a DBIx::Class schema using "make_schema_at" in DBIx::Class::Schema::Loader and dumps it to disk. that's the whole gig. main character behavior honestly π
you can pass any DBIx::Class::Schema::Loader::Base constructor option using -o <option>=<value>. and here's the cute little convenience: option names will have - replaced with _, and values that look like references or quote-like operators will be eval-ed before being passed to the constructor. yes, eval-ed. it's giving powerful-and-slightly-unhinged, and we love that for us π
the dump_directory option defaults to the current directory if not specified. so if you don't say where, it just... vibes right where you're standing π
π₯ SEE ALSO π₯
DBIx::Class::Schema::LoaderDBIx::Class
go read those too, bestie, they're the whole lore π
π AUTHORS π
See "AUTHORS" in DBIx::Class::Schema::Loader. (yes, the authors are over there. we're not retyping the whole list, that's a them thing π)
β LICENSE β
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr π«Ά
and that's the whole page!! this was DBICDUMP(1) from perl v5.42.0, dated 2025-07-25, brought to you by the User Contributed Perl Documentation squad. ily, go dump a schema, you're gonna slay πβ¨ππ¦
π¦ where this page comes from
- fedora 43: perl-DBIx-Class-Schema-Loader 0.07053-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms