Log::Report::Die(3pm)

πŸ’– Log::Report::Die πŸ’–

okay bestie, so this page is the perl manpage Log::Report::Die(3pm) β€” it's the lil compatibility baddie that lives in the Log-Report world, and it's here to translate perl's die/croak/confess drama into something the report system can actually work with. it does NOT do much on its own. it's backstage. it's the stage manager. πŸ‘‘


✨ NAME ✨

Log::Report::Die β€” compatibility routines with Perl's die/croak/confess

like, it exists purely so the old-school death cries can vibe with the new exception system. no cap.


🌸 INHERITANCE 🌸

Log::Report::Die
  is an Exporter

so yeah, it's an Exporter. it hands you functions. that's the whole family tree, she's an only child πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

# use internally only

that's it. that's the synopsis. use internally only β€” this is NOT a "hey bestie import me into your app" situation. it's for the module's own insides 🫢


⭐ DESCRIPTION ⭐

so this module is used internally, and its whole job is translating the output of die and the Carp functions into Log::Report::Message objects ✨

and it's not picky either β€” it also tries to convert other kinds of exception frameworks into our message object. very "the more the merrier" of it 🌈


πŸŽ€ FUNCTIONS πŸŽ€

πŸ’œ die_decode(STRING, %options)

the STRING here is literally the content of $@ after an eval() caught a die(), croak(), or confess() 😭 this routine tries to convert that into parameters for Log::Report::report(). and it does it in a very smart way β€” like, it even tries to find the stringifications of $! πŸ”₯

what you get back is four elements:

  • the error string or object which triggered the death originally (that's the original $@)
  • the opts
  • the reason
  • the plain text message

the opts is a HASH which, amongst other things, may contain a stack trace and location extracted from the death text or object πŸ“

translated components will have exception classes perl, and die or confess. and okay, important lil disclaimer: on the moment, the croak cannot be distinguished from the confess (when used in package main) or die (otherwise) πŸ’€ so don't come for her about that.

the returned reason depends on whether the translation of the current $! is found in the STRING, and the presence of a stack trace. the following table is used:

  errstr  stack  =>  reason
    no      no       ERROR   (die) application internal problem
    yes     no       FAULT   (die) external problem, think open()
    no      yes      PANIC   (confess) implementation error
    yes     yes      ALERT   (confess) external problem, caught

and here's the option sitch:

 -Option--Default
  on_die  'ERROR'
  • on_die => REASON β€” default is 'ERROR', and it lets you pick which REASON gets used

🧚 exception_decode($exception, %options)

<span class="purple">[1.23]</span> this function attempts to translate objects of other exception frameworks into information to create a Log::Report::Exception. it returns the same list of parameters as die_decode() does 🫢

currently supported:

  • DBIx::Class::Exception
  • XML::LibXML::Error

that's the roster for now, queens. short but iconic πŸ‘‘


🌈 SEE ALSO 🌈

this module is part of Log-Report version 1.46, built on June 16, 2026 πŸ“…

website: http://perl.overmeer.net/CPAN/


πŸ’– LICENSE πŸ’–

for contributors see file ChangeLog.

this software is copyright (c) 2007-2026 by Mark Overmeer.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt πŸ’…


okay that's the whole page bestie, no details skipped, all facts intact, vibe immaculate πŸ’–βœ¨

so like, this doc was generated by perl v5.40.1 back on 2026-07-05 and it lives under the name Log::Report::Die(3pm) β€” big fan, go read the source, stan Mark Overmeer, bye πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from