Sympa::CommandDef(3Sympa)

πŸ’Œ NAME

Sympa::CommandDef β€” the lil dictionary of mail commands, fr fr. It's the definition of mail commands, periodt.


✨ SYNOPSIS ✨

TBD

ngl bestie, it's giving "we'll fill this in later" 😭 moving on!


🌸 DESCRIPTION 🌸

So this module? It literally just keeps the definition of mail commands. That's the whole job. Iconic, honestly. πŸ’…

πŸ’– Global variable πŸ’–

  • %comms β€” okay so this hash is THE blueprint for what mail commands look like. It's what lets Sympa go back and forth between raw command lines and the internal request objects. Decoding and encoding, both directions, no cap. πŸ¦‹

The key is the name of the action β€” and that's the same name you pass as the "action" parameter to the constructor of Sympa::Request. Heads up tho: not all sorts of requests are defined here. So don't come for it when something's missing, it was never claimed. πŸ™ˆ

The value is a hashref. And each item inside that hashref accepts these keywords: ⭐

  • cmd_regexp β€” a regexp that matches the command. Lowkey important: the "i" modifier is necessary here. Not optional, bestie. 😀
  • arg_regexp β€” a regexp that matches the command line arguments. And yeah, the "i" modifier may be needed this time. Vibes-dependent. 🌈
  • arg_keys β€” an arrayref of parameter names that maps the command line onto the attribute. But wait, there's a special one πŸ‘‘: 'localpart'. If 'localpart' is contained in there, then the "context" attribute of the resulting request object is an instance of the Sympa::List class. Special little guy, honestly.
  • cmd_format β€” a string used to format the command line using attributes. And here's the twist πŸŽ€: if this item is a code reference, it gets called with the request object, and whatever it returns is used as the format string. Callback era.
  • filter β€” a coderef for doing some extra checking. It's called with the request object, and if it returns a false value, the decoding fails. 🫢 So like, this is the bouncer at the door. If it says no, bestie is not getting in.

πŸ” SEE ALSO πŸ”

  • Sympa::Request
  • Sympa::Request::Message

Go read those too, iykyk. πŸ“šβœ¨


🌟 HISTORY 🌟

Sympa::CommandDef appeared on Sympa 6.2.13 β€” a real glow-up moment for the timeline. πŸ’œ


And that's the whole page, bestie!! πŸŽ€ This was Sympa::CommandDef from sympa 6.2.80, dated 2026-10-19 β€” so when you're out here decoding mail commands, just know she ate and left no crumbs. Mwah. πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from