DBIx::Class::Carp(3)

πŸ¦‹ DBIx::Class::Carp(3) β€” advanced carp, DBIC edition πŸ¦‹

okay bestie, this is the DBIx::Class::Carp(3) page from the User Contributed Perl Documentation, and it's here to explain the warning functions. ✨

🌸 NAME 🌸

DBIx::Class::Carp β€” Provides advanced Carp::Clan-like warning functions for DBIx::Class internals. 🫢

πŸ’– DESCRIPTION πŸ’–

real talk: the docs are lacking on purpose β€” this is an experiment not yet fit for mass consumption. If you use this, do not count on any kind of stability. In fact, don't even count on this module's continuing existence (it has been noindexed for a reason). πŸ’€

In addition to the classic interface:

use DBIx::Class::Carp '^DBIx::Class'

this module also supports a class-data based way to specify the exclusion regex. A message is only carped from a callsite that matches neither the closed-over string, nor the value of _skip_namespace_frames as declared on any callframe already skipped due to the same mechanism. This is to ensure that intermediate callsites can declare their own additional skip-namespaces. 🧚

πŸ‘‘ CLASS ATTRIBUTES πŸ‘‘

  • _skip_namespace_frames β€” a classdata attribute holding the stringified regex matching callsites that should be skipped by the carp methods below. An empty string q{} is treated like no setting/undef (the distinction is necessary due to semantics of the class data accessors provided by Class::Accessor::Grouped). πŸŽ€

πŸ’… EXPORTED FUNCTIONS πŸ’…

This module exports the following 3 functions. Only warning-related carp* is being handled here; for croak-ing you must use throw_exception in DBIx::Class::Schema or DBIx::Class::Exception. πŸ’œ

🌟 carp

Carps message with the file/line of the first callsite not matching _skip_namespace_frames nor the closed-over arguments to use DBIx::Class::Carp.

πŸŽ€ carp_unique

Like carp but warns once for every distinct callsite (subject to the same ruleset as carp).

πŸ¦‹ carp_once

Like carp but warns only once for the life of the perl interpreter (regardless of callsite).

🌈 FURTHER QUESTIONS? 🌈

Check the list of additional DBIC resources. πŸ‘‘

This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.

xoxo, your manual bestie πŸ’– β€” this page is from perl v5.42.0, dated 2025-01-22, and it's DBIx::Class::Carp(3). slay πŸ’…

πŸ“¦ where this page comes from