XML::Pa...tchName(3)
🎀 NAME 🎀
okay so bestie, welcome to the XML::PatAct::MatchName(3) page — it's from User Contributed Perl Documentation. The header is out here vibing as XML::Pa...tchName(3) because truncation said “not today” 💀, but the actual star of the show is this:
XML::PatAct::MatchName — a pattern module for matching element names.
✨ SYNOPSIS ✨
Here’s the lil code moment, copy it exactly and don’t let anyone tell you otherwise:
use XML::PatAct::MatchName;
my $matcher = XML::PatAct::MatchName->new();
my $patterns = [ 'foo' => ACTION,
'bar/foo' => ACTION,
... ];
🦋 DESCRIPTION 🦋
So XML::PatAct::MatchName is a pattern module for use with PatAct drivers when you’re applying pattern-action lists to XML parses or trees. It’s giving simple, iconic, does-one-thing energy: it uses just element names to match on. 🎯
If multiple names are supplied, separated by "/" characters, then all of the parent element names must match as well. Yes bestie, the whole parent chain has to line up, iykyk. 🫶
The order of patterns in the list is not significant. XML::PatAct::MatchName will use the most specific match. Using the synopsis above as the example: if you have an element "foo", then "bar/foo" will match if "foo" is in an element "bar"; otherwise just the pattern with "foo" will match. Slay specificity, periodt. 💅
👑 AUTHOR 👑
The author is Ken MacLeod, at ken@bitsko.slc.ut.us 💌
🌈 SEE ALSO 🌈
perl(1)- “Using PatAct Modules” and “Creating PatAct Modules” in libxml-perl.
okay that’s the page! huge mwah toperl v5.42.0and the date2024-03-04for the footer moment —XML::Pa...tchName(3)signing off 🫶✨💅
📦 where this page comes from
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 · Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 · Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 · Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 · Artistic-1.0 OR GPL-2.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms