DBICDUMP(1)

πŸ“¦
version 0.07053 Β· 4 versions
, in fedora 43

πŸ’– 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 requires Config::Any installed. no Config::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::Loader
  • DBIx::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