PPIx::R...oupType(3)

🌸 PPIx::R...oupType(3) 🌸

okay bestie, welcome to the PPIx::Regexp::Token::GroupType page πŸ’… this is part of the User Contributed Perl Documentation and honestly? it's giving "quietly iconic internals". it's literally about Represent a grouping parenthesis type. β€” periodt. πŸŽ€


✨ NAME ✨

PPIx::Regexp::Token::GroupType</p> β€” Represent a grouping parenthesis type. πŸ’–


🌈 SYNOPSIS 🌈

use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'qr{(?i:foo)}smx' )
    ->print();

like, that's it. that's the whole vibe check. πŸ¦‹


πŸ‘‘ INHERITANCE πŸ‘‘

"PPIx::Regexp::Token::GroupType" is a PPIx::Regexp::Token. slay, it has a parent.

and it is the parent of all these iconic little ones:

  • PPIx::Regexp::Token::GroupType::Assertion
  • PPIx::Regexp::Token::GroupType::Atomic_Script_Run
  • PPIx::Regexp::Token::GroupType::BranchReset
  • PPIx::Regexp::Token::GroupType::Code
  • PPIx::Regexp::Token::GroupType::Modifier
  • PPIx::Regexp::Token::GroupType::NamedCapture
  • PPIx::Regexp::Token::GroupType::Script_Run
  • PPIx::Regexp::Token::GroupType::Subexpression
  • PPIx::Regexp::Token::GroupType::Switch

nine children, one mom, main character energy fr fr. πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so this class represents any of the magic sequences of characters that can follow an open parenthesis. yk, the little gremlin letters right after ( in a regex.

and the tea? 🍡 this particular class is intended to be abstract. it's the vibe, not the whole meal. πŸ™ˆ


✨ METHODS ✨

This class provides no public methods beyond those provided by its superclass. so it's like... inherited. lowkey. πŸ’…


πŸŽ€ __defining_string πŸŽ€

my $string = $class->__defining_string();
⚠️ this method is private to the "PPIx-Regexp" package, and is documented for the author's benefit only. it may be changed or revoked without notice. so don't build your whole personality on it bestie 😭

This method returns an array of strings that define the specific group type. these strings will normally start with '?'.

Optionally, the first returned item may be a hash reference. the only supported key is "{suffix}", which is a string to be suffixed to each of the regular expressions made by "__make_group_type_matcher()" out of the defining strings, inside a (?= ... ), so that it is not included in the match. sneaky. 😏

This method must be overridden, unless "__make_group_type_matcher()" is. and the override must return the same thing each time, since the results of "__make_group_type_matcher()" are cached. consistency is hot. πŸ”₯


🌸 __make_group_type_matcher 🌸

my $hash_ref = $class->__make_group_type_matcher();
⚠️ also private to the "PPIx-Regexp" package, also for the author's benefit only, also may be changed or revoked without notice. πŸ™ˆ

This method returns a reference to a hash. the keys are regexp delimiter characters which appear in the defining strings for the group type. for each key, the value is a reference to an array of "Regexp" objects, properly escaped for the key character. key '' provides the regular expressions to be used if the regexp delimiter does not appear in any of the defining strings. the fallback key, the understudy, the backup dancer. πŸ’ƒ

If this method is overridden by the subclass, method "__defining_string()" need not be, unless the overridden "__make_group_type_matcher()" calls "__defining_string()". conditional queen. πŸ‘‘


πŸ¦‹ __match_setup πŸ¦‹

$class->__match_setup( $tokenizer );
⚠️ private to the "PPIx-Regexp" package, author's benefit only, may be changed or revoked without notice. same disclaimer, different method πŸ’€

This method performs whatever setup is needed once it is determined that the given group type has been detected. it's called only if the class matched at the current position in the string being parsed. it must perform whatever extra setup is needed for the match. it returns nothing. no receipts, no return value, just vibes. ✨

This method need not be overridden. the default does nothing. the default is the friend who shows up and contributes nothing and honestly that's valid. 😌


πŸ’œ __setup_class πŸ’œ

$class->__setup_class( \%definition, \%opt );
⚠️ private to the "PPIx-Regexp" package, for the author's benefit only, may be changed or revoked without notice. okay that's the last time i say it, you get it now 🫢

This method uses the %definition hash to create the "__defining_string()", explain(), perl_version_introduced(), and perl_version_removed() methods for the calling class. any of these that already exist will not be replaced. respect the originals. πŸ™…

The %definition hash defines all the strings that specify tokens of the invoking class. you can not (unfortunately) use this mechanism if you need a regular expression to recognize a token that belongs to this class. rip. 😭

The keys of the %definition hash are strings that specify members of this class. the values are hashes that define the specific member of the class. the following values are supported:

  • {expl} β€” this is the explanation of the element, to be returned by the explain() method.
  • {intro} β€” this is the Perl version that introduced the element, as a string. the default is the value of constant MINIMUM_PERL.
  • {remov} β€” this is the Perl version that removed the element, as a string. the default is "undef", meaning that the element is still present in the highest released version of Perl, whether development or production. it's not gone, bestie, it's just undef. πŸ’€

The %opt hash is optional, and defaults to the empty hash. it is used, basically, for ad-hocery. the supported keys are:

  • {suffix} β€” if this element is defined, the first element returned by the generated __defining_string() method is a hash containing this key and value. ✨

🫢 SUPPORT 🫢

Support is by the author. please file bug reports at <https://github.com/trwyant/perl-PPIx-Regexp/issues> or in electronic mail to the author. they want your bug reports, ngl, that's how the glow-up happens. 🌈


🌟 AUTHOR 🌟

Thomas R. Wyant, III β€” harryfmudd at comcast dot net πŸ‘‘


Copyright (C) 2009-2023, 2025-2026 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. for more details, see the full text of the licenses in the directory LICENSES. πŸ“œ

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. read that twice bestie, no cap. ⚠️


and that's the page!! πŸ’–βœ¨ this whole thing is perl v5.42.2, dated 2026-06-15, straight out of the PPIx::R...oupType(3) manual. slay, ate, no crumbs left. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from