MR::IP...Request(3pm)

πŸ’Œ MR::IProto::Request β€” request message

okay bestie, welcome to MR::IProto::Request ✨ this is a lil Perl module that lives in the user-contributed Perl docs, and it's giving "blueprint energy" because it's literally the base class for all request messages. think of it as the mom friend of the request-message family β€” it doesn't do the whole job itself, it just sets the vibe and lets the subclasses handle the rest πŸ’…


🌸 DESCRIPTION 🌸

Base class for all request messages.

that's it, that's the whole thing. it's the template, the skeleton, the "you go do the actual work" parent πŸ‘‘ you don't instantiate this bad boy directly β€” you inherit from it and fill in the blanks.


✨ PUBLIC METHODS ✨

these are the ones the world gets to see. the main character methods πŸ’–

  • key β€” returns the key value. but here's the tea πŸ«–: you must reimplement this method in your subclass to use this feature. it does not come free, bestie, you gotta write it yourself.
  • retry β€” tells you if request retry is allowed. that's it. no cap.

πŸ”’ PROTECTED METHODS πŸ”’

these ones are for the internals, the behind-the-scenes girlies πŸŽ€ subclasses and the module itself use them, not random outside callers.

  • key_attr β€” a class method which must return name of key attribute.
  • _build_data β€” you must implement this method in you subclass to pack your object. returns packed data. yes, the original really does say "you subclass", we are keeping it exactly as it is because that's the law around here πŸ“œ
fr fr, if you skip implementing key or _build_data in your subclass, the feature just won't work. the base class is not gonna do it for you, she's off the clock πŸ™ˆ

that's the whole page, no skips, no cuts, every last crumb preserved πŸ“

sign-off time: this page ships with perl v5.30.3 and is dated 2020-07-21 β€” iconic behavior, honestly πŸ’œ stay hydrated, implement your abstract methods, and go slay your request messages βœ¨πŸ¦‹

πŸ“¦ where this page comes from