DBIx::...YouMean(3pm)

πŸ“¦
version 2.037000 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– DBIx::...YouMean(3pm) πŸ’–

okay bestie, listen β€” it's actually DBIx::Class::Helper::Schema::DidYouMean, and it's giving "nice error messages when you misspell the name of a ResultSet". no more cryptic dead-ends, no more staring at your terminal like πŸ‘οΈπŸ‘„πŸ‘οΈ. it just tells you what you meant. slay.


✨ SYNOPSIS ✨

first up, you gotta load the component into your schema, like so:

package MyApp::Schema;

__PACKAGE__->load_components('Helper::Schema::DidYouMean');

then, elsewhere in your code (iykyk, wherever you're actually doing stuff):

$schema->resultset('Usre')->search(...)->...

and boom πŸ’₯ β€” instead of silence and suffering, a nice exception gets thrown:

The ResultSet "Usre" is not part of your schema.

To help you debug this issue, here's a list of the actual sources that the
schema knows about:

    Account
    Permission
    Role
  * User <-- Possible Match

look at that little * doing the lord's work. that's your match, babe. 🎯


🌸 DESCRIPTION 🌸

so here's the tea β˜• β€” this helper captures errors thrown when you use the resultset method on your schema and typo the source name. instead of leaving you stranded in the void, it tries to highlight the best guess as to which one you meant to type. it's literally the friend who goes "no babe, you meant User" and honestly? we stan. πŸ‘‘


🫢 AUTHOR 🫢

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


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 the whole vibe, bestie β€” this page came to you courtesy of perl v5.40.0 and it was documented on 2024-11-16. go forth and never typo a ResultSet name in shame again πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from