DBIx::C...efaults(3)

πŸ’– DBIx::Class::DeploymentHandler::WithReasonableDefaults πŸ’–

okay so bestie, welcome to the User Contributed Perl Documentation section, and lemme tell you about this lil role called DBIx::Class::DeploymentHandler::WithReasonableDefaults 🫢


✨ NAME ✨

DBIx::Class::DeploymentHandler::WithReasonableDefaults β€” it makes the default arguments to a few methods actually sensible πŸ’…


🌸 CONVENIENCE 🌸

okay so the whole entire point of this role? it sets up defaults for the arguments of a bunch of different methods. that's it. that's the gig. and honestly?? it's a little awesome. not even gonna be humble about it 😌✨


πŸŽ€ METHODS πŸŽ€

πŸ’œ prepare_upgrade

the args it defaults for you, no cap:

my $from_version = $self->initial_version;
my $to_version   = $self->schema_version;
my $version_set  = [$from_version, $to_version];

like. it just knows what you meant. iconic behavior fr fr πŸ‘‘


πŸ¦‹ prepare_downgrade

and here's what it defaults this time around:

my $from_version = $self->schema_version;
my $to_version   = $self->data_version;
my $version_set  = [$from_version, $to_version];

notice how $from_version and $to_version are literally swapped from prepare_upgrade?? that's not a typo bestie, that's the whole point of a downgrade, we're going the other way πŸ”„πŸ’€


πŸ“ install_resultsource

defaulted arg, singular, she only needs one:

my $version = $self->to_version;

πŸ‘‘ AUTHOR πŸ‘‘

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

give it up for fREW, the main character who wrote all this 🫢✨


This software is copyright (c) 2025 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

so like, yes you can copy it, yes you can remix it, just keep the same terms as Perl 5 itself and we're all good πŸ§šπŸ’–


and that's the whole page bestie!! 🌟 this was perl v5.42.0 energy, dated 2026-01-17, straight outta the DBIx::C...efaults(3) zone β€” slay, ate, no crumbs left, periodt πŸ’…πŸŽ€πŸ’œ

πŸ“¦ where this page comes from