Syntax::HTML(3pm)
π 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. SeeEmbperl::Syntaxfor a definition of procinfo.$taginfoβ Additional tag definitions. SeeEmbperl::Syntaxfor more infos.$addsessβ If set to1session id will be added to attributes passed via$attrsurl. If set to2a 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
- ubuntu jammy: libembperl-perl 2.5.0-16build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms