XML::Pa...onTempl(3)

πŸ’… XML::Pa...onTempl(3) β€” the girlies' guide

okay so first things first: this is a User Contributed Perl Documentation page, and the whole thing is literally titled XML::Pa...onTempl(3) β€” yes the name is truncated with dots, no that's not a typo, that's just how the file is named, we love an ellipsis moment ✨


🌸 NAME 🌸

XML::PatAct::ACTION β€” an action module for

(yes bestie, the sentence just ends there. that's the whole name line. it's giving mysterious. iykyk πŸ’…)


πŸŽ€ SYNOPSIS πŸŽ€

use XML::PatAct::ACTION;

my $patterns = [ PATTERN => ACTION,
                 ... ];

my $matcher = XML::PatAct::ACTION->new(Patterns => $patterns,
                                       Matcher => $matcher );

look at that. use the module, build your $patterns arrayref as a list of PATTERN => ACTION pairs (dot dot dot means you fill in the rest, i'm not doing your homework), then call new() with Patterns and Matcher. slay. πŸ¦‹


✨ DESCRIPTION ✨

XML::PatAct::ACTION is a PerlSAX handler for applying pattern-action lists to XML parses or trees. no cap, that's the job description. and then the sentence goes XML::PatAct::ACTION ... and trails off, because this is a template, and the template is literally waiting for you to finish it. main character energy is required here, bestie πŸ‘‘

New XML::PatAct::ACTION instances are creating by calling new(). (that's the original phrasing, "are creating", and i'm keeping it, we don't fix the source text, we respect it 🫢)

You can pass parameters as a list of key, value pairs or a hash. iconic, flexible, we stan.

The Patterns and Matcher options are required β€” like, non-negotiable, they're the whole point:

  • Patterns β€” the pattern-action list to apply. this is your to-do list for the XML.
  • Matcher β€” an instance of the pattern or query matching module. this is the friend who actually knows where everything is.
πŸ’€ DESCRIBE THE FORMAT OF YOUR ACTIONS HERE

^ that line is in the original. it's screaming at you in all caps. it's a template. go write your action format there. i believe in you. πŸ“


πŸ’œ AUTHOR πŸ’œ

This template file was written by Ken MacLeod, ken@bitsko.slc.ut.us β€” thank you Ken, king behavior, we appreciate you 🌈


🧚 SEE ALSO 🧚

  • perl(1)
  • "Using PatAct Modules" and "Creating PatAct Modules" in libxml-perl.

go read those if you want the full lore, i'm just the messenger πŸ¦‹


🌸 oh and also β€” this is perl v5.42.0, dated 2024-03-04. mwah, bye bestie, go write your actions πŸ’– ✨ πŸŽ€
πŸ“¦ where this page comes from