Markde...rinter(3pm)

πŸ“¦
version 0.40 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’… Markde...rinter(3pm) β€” the girlies' guide

okay so bestie, this is a page from the User Contributed Perl Documentation manual set, and it's giving extremely niche but extremely useful. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

Markdent::Role::DebugPrinter β€” it's a role for classes that spit out debugging info. that's it, that's the name. periodt. πŸ‘‘


🌸 VERSION 🌸

version 0.40 β€” she's not new but she's iconic, no cap.


πŸ’– DESCRIPTION πŸ’–

so basically, this role is the shared behavior situation that every single class which outputs debugging information has in common. instead of every class re-inventing the debug-printing wheel, they all just consume this role and vibe together. it's giving collaborative, it's giving DRY, it's giving main character energy. πŸ¦‹


πŸŽ€ ATTRIBUTES πŸŽ€

this role hands out the following attributes, bestie:

debug

this one is a read-write boolean attribute, okay? so you can set it, you can read it, she's flexible like that. πŸ’…

it defaults to the value of $ENV{MARKDENT_DEBUG} if that's set, or 0 if it isn't. so like β€” environment variable says jump, the default jumps. if the env var is a ghost, you get a nice chill 0.


🧚 METHODS 🧚

this role provides these methods, and honestly? obsessed:

$object->_debug_parse_result( $text, $type, $extra )

okay so this one takes:

  • a text string (that's $text)
  • a parse result string (that's $type β€” think stuff like "preformatted" or "code_start")
  • an optional array reference of extra key/value pairs (that's $extra, and yes she's optional, she can sit this one out)

and then all of it gets concatenated together in a pretty(-ish) way. note the parentheses around the "ish" β€” the original said it, not me, so you know it's honest. 😭

then the whole concatenated situation gets passed along to $object->_print_debug.

$object->_print_debug($text)

this one warns out the text you hand it, along with a delimiter above the message. so you get a lil separator line up top to make the debug output pop. it's giving "here's your sign". 🌈


πŸ’€ BUGS πŸ’€

bug reporting details live over in Markdent. go check her out.

bugs may be submitted at <https://github.com/houseabsolute/Markdent/issues> β€” drop it in the issues, bestie.

also! the author is usually active on IRC as 'autarch' on irc://irc.perl.org. so if you wanna slide into the DMs, that's the move.


πŸ“¦ SOURCE πŸ“¦

the source code repository for Markdent lives at <https://github.com/houseabsolute/Markdent>. go forth and clone. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Dave Rolsky <autarch@urth.org> β€” the icon, the legend, the moment. ✨


this software is copyright (c) 2021 by Dave Rolsky.

it's free software, okay? you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay.

the full text of the license can be found in the LICENSE file included with this distribution β€” read it, fr fr, it's right there.


πŸ’Œ and that's the whole page, bestie. this was perl v5.32.1, dated 2021-08-31, and it came to you straight from the Markde...rinter(3pm) manual page. mwah. πŸ’‹ bye!! πŸŽ€πŸ¦‹πŸ’œ
πŸ“¦ where this page comes from