Log::R...ptional(3pm)

πŸ’– NAME πŸ’–

Log::Report::Optional β€” bestie, you get to pick between Log::Report and ::Minimal. That's it, that's the whole job, and it's iconic for it.

(also this page is Log::R...ptional(3pm), yes the name got squished by the formatting, we don't talk about it πŸ™ˆ)

🌈 INHERITANCE 🌈

Log::Report::Optional
  is an Exporter

She's an Exporter, periodt. That's how the goodies get into your namespace.


✨ SYNOPSIS ✨

# Use Log::Report when already loaded, otherwise Log::Report::Minimal
package My::Package;
use Log::Report::Optional 'my-domain';

Two lines. One use. That's the whole drip πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the lore, and it's genuinely so smart.

This module lets libraries (you know, helper modules, the little guys) depend on a small module instead of dragging the entire full Log-Report distribution along with them. Nobody wants that. It's giving carry-on luggage that has its own carry-on luggage. 😭

The full power of Log::Report is only released when the main program itself uses that module. So:

  • if the main program is using Log::Report β†’ then the module that used the 'Optional' flavor will also use the full Log::Report. slay πŸ’–
  • if not β†’ you get the dressed-down Log::Report::Minimal version instead. cozy, small, does the job.

For the full documentation, go peep:

  • see Log::Report when it is used by main πŸ₯°
  • see Log::Report::Minimal otherwise 🫢

The latter (Log::Report::Minimal, bestie, keep up) provides the same functions as the former β€” it's just the simpl-est possible way of doing it. Low-key minimalism. High-key genius. ✨


πŸŽ€ METHODS πŸŽ€

  • $class->usedBy() β€” returns the classes which loaded the optional module. Like a little guest list. πŸ‘‘ Who used me? It'll tell you.

🌸 SEE ALSO 🌸

This module is part of Log-Report-Optional version 1.08, built on September 08, 2025. Website: http://perl.overmeer.net/CPAN/

Go look, it's right there, no cap πŸ¦‹


πŸ’œ LICENSE πŸ’œ

For contributors see file ChangeLog.

This software is copyright (c) 2013-2025 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. So yeah β€” free, open, share it, remix it, just keep the same terms, kay? 🫢


okay that's the whole page bestie, you ate it πŸ’…βœ¨ this was Log::R...ptional(3pm) from perl v5.40.1, dated 2025-10-04 β€” love that for us, bye!! πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from