Syntax::HTML(3pm)

πŸ“¦
version 2.5.0 Β· 2 versions
, in ubuntu jammy

πŸ’– NAME πŸ’–

Embperl::Syntax::HTML β€” bestie, this is the module that defines the syntax for HTML ✨


🌸 SYNOPSIS 🌸

okay so. there's genuinely nothing here. the synopsis is empty. iconic of it honestly, it's giving "figure it out yourself" πŸŽ€ but like, in a cool way. the real tea is in DESCRIPTION and Methods below πŸ‘‡


πŸ¦‹ DESCRIPTION πŸ¦‹

So Embperl::Syntax::HTML is a class that's derived from Embperl::Syntax, and its whole job is defining the syntax for HTML. That's it, that's the vibe πŸ’…

And here's the thing β€” this class does not add any functionality of its own. No cap. It just provides methods and definitions so that derived classes can go implement their own tags. It's like the group chat admin who sets everything up and then lets everyone else send the messages πŸ‘‘


✨ Methods ✨

Embperl::Syntax::HTML defines these methods, and we're going through every single one because we don't skip πŸ’–

πŸ’« Embperl::Syntax::HTML -> new / $self -> new

Create a new syntax class. Heads up bestie: this method should only be called inside a constructor of a derived class. Don't just be out here calling it wherever, it's not that kind of party πŸ™ˆ

πŸ’« AddTag ($tagname, $attrs, $attrsurl, $attrsnoval, $procinfo, $taginfo, $addsess)

Add a new HTML tag. Let's break down every single parameter because they all matter:

  • $tagname β€” Name of the HTML tag.
  • $attrs β€” List of attributes that should be parsed out.
  • $attrsurl β€” List of attributes that should be parsed out. Any output inside the attribute value is url escaped. πŸ”₯
  • $attrsnoval β€” List of attributes that should be parsed out and doesn't contain a value.
  • $procinfo β€” Processor info. See Embperl::Syntax for a definition of procinfo.
  • $taginfo β€” Additional tag definitions. See Embperl::Syntax for more infos.
  • $addsess β€” If set to 1 session id will be added to attributes passed via $attrsurl. If set to 2 a hidden input tag with the session id will be added.

πŸ’« AddTagInside ($tagname, $attrs, $attrsurl, $attrsnoval, $procinfo)

Same as AddTag, but tag could be also used inside of another tag. (e.g. <sometag <someothertag> >). Important: this is not HTML or XML compatible, but maybe useful for implementing tagslibs etc. sometimes. So like, use it if you need it, but know what you're doing 🫢

πŸ’« AddComment ($tagname, $attrs, $attrsurl, $attrsnoval, $procinfo)

Add a new HTML comment. Parameters are the same as for "AddTag". Easy peasy πŸ’…

πŸ’« AddTagBlock ($tagname, $attrs, $attrsurl, $attrsnoval, $procinfo)

Add a new HTML tag with start and end tag (e.g. <table> and </table>). Parameters are the same as for "AddTag". Matching set, we love to see it πŸŽ€

πŸ’« AddTagWithStart ($tagname, $startname, $attrs, $attrsurl, $attrsnoval, $procinfo)

Add a new HTML tag which is an endtag for another tag. In opposite to "AddTagBlock" the end tag can, but need not exists in the source. Parameters are the same as for "AddTag". Additionally the name of the starttag must be specified. Don't forget that extra one bestie, it's literally required ⭐


πŸ‘‘ Author πŸ‘‘

G. Richter (richter at embperl dot org) πŸ’œ


🌈 See Also 🌈

  • Embperl::Syntax

okay and for the cute sign-off moment: this lil beauty is perl v5.34.0, dated 2022-02-06, and it lives its life as Syntax::HTML(3pm) in the User Contributed Perl Documentation. periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from