DBIx::...assDWIM(3pm)
π DBIx::Class::Helper::ResultSet::ResultClassDWIM
okay bestie, this is the page for DBIx::Class::Helper::ResultSet::ResultClassDWIM (the manual is filed under DBIx::...assDWIM(3pm) if you're looking for it in your man setup π«Ά), and the whole vibe is literally in the tagline:
result_class => '::HRI' == WIN
no cap. that's the entire personality. let's get into it β¨
β¨ NAME β¨
DBIx::Class::Helper::ResultSet::ResultClassDWIM β result_class => '::HRI' == WIN π
πΈ SYNOPSIS πΈ
so first you gotta load the component into your ResultSet class, like:
package MyApp::Schema::ResultSet::Foo;
__PACKAGE__->load_components(qw{Helper::ResultSet::ResultClassDWIM});
...
1;
and then, elsewhere (the fun part π):
my $data = $schema->resultset('Foo')->search({
name => 'frew'
}, {
result_class => '::HRI'
})->all;
π¦ DESCRIPTION π¦
okay so here's the tea β: this component lets you prefix your result_class with :: to say "bestie, use the default namespace" β namely, DBIx::Class::ResultClass::. that's it. that's the trick. iconic behavior honestly π
::HRI has been hardcoded to work. and of course ::HashRefInflator would also work fine. slay.
also!! see "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it to your entire schema. whole-schema glow-up, we love to see it π
π AUTHOR π
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2024 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.
and that's a wrap, bestie π
this was DBIx::...assDWIM(3pm) from the User Contributed Perl Documentation, generated with perl v5.40.0 on 2024-11-16. go forth and inflate those hashrefs, ily π«Άβ¨
π¦ where this page comes from
- debian trixie: libdbix-class-helpers-perl 2.037000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdbix-class-helpers-perl 2.037000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdbix-class-helpers-perl 2.037000-1 Β· 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