Markde...ragment(3pm)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to Markdent::Handler::HTMLStream::Fragment(3pm) β€” this little icon is a Markdent handler that turns a whole stream of Markdent events into an HTML fragment. that's it, that's the job. it's the handler for when you want the HTML but NOT the whole document wrapper, iykyk.


✨ VERSION ✨

version 0.40 πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this class takes an event stream and turns it into an HTML document, but without a doctype, and without the <html>, <head>, or <body> tags. just the fragment. the little guys. the inner content. she's giving piece of a page, not the whole page, and honestly? obsessed. πŸ’…


🌸 METHODS 🌸

this role provides the following methods:

πŸŽ€ Markdent::Handler::HTMLStream::Document->new(...)

this method creates a new handler. it accepts the following parameters:

  • output => $fh β€” the file handle (or object) that the HTML output gets streamed to. if you wanna capture the output into a string instead, you can just open a filehandle onto a string, like this:
my $buffer = q{};
open my $fh, '>', \$buffer;

if you pass in a file handle (or an IO::Handle object), then every single call to print() gets checked, and if something's wrong an error gets thrown. 😀 no silent failures here.

you can also pass an object of any other class β€” it just has to implement its own print() method, and then all the error handling is left up to that method. your object, your rules, your consequences. 🫢


πŸ‘‘ ROLES πŸ‘‘

this class does the Markdent::Role::HTMLStream, Markdent::Role::EventsAsMethods, and Markdent::Role::Handler roles. three roles, one slay. 🌈


πŸ’€ BUGS πŸ’€

see Markdent for bug reporting details, bestie.

bugs may be submitted at <https://github.com/houseabsolute/Markdent/issues>.

i am also usually active on IRC as 'autarch' on irc://irc.perl.org. come say hi fr fr πŸ™ˆ


πŸ”₯ SOURCE πŸ”₯

the source code repository for Markdent can be found at <https://github.com/houseabsolute/Markdent>. go look, it's right there, no cap. ⭐


πŸ’œ AUTHOR πŸ’œ

Dave Rolsky <autarch@urth.org> β€” the main character, honestly. πŸ‘‘


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

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

the full text of the license can be found in the LICENSE file included with this distribution.


okay that's the whole page, and for the sign-off β€” this was built on perl v5.32.1, dated 2021-08-31, and the manual it lives in is Markde...ragment(3pm) πŸ’– go forth and fragment, bestie, you got this βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from