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 π«Άβ¨
π COPYRIGHT AND LICENSE π
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
- fedora 44: perl-DBIx-Class-DeploymentHandler 0.002235-2.fc44 Β· 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