Tangen...Method(3pm)

πŸ“¦
version 0.33 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Tangence::Meta::Method β€” bestie, it's a whole data structure that represents ONE Tangence method πŸ’…

It lives in the User Contributed Perl Documentation corner of the manual, and honestly? It's giving "quietly essential". πŸŽ€


🌸 DESCRIPTION 🌸

Okay so picture this: this data structure object is literally just holding onto info about a single Tangence class method. That's its whole job. That's its main character arc. πŸ’–

And here's the tea β€” once you construct one of these bad boys, it's immutable. Frozen. Locked in. No take-backs, no edits, no "wait actuallyβ€”". It said what it said. Periodt. πŸ”₯


πŸ¦‹ CONSTRUCTOR πŸ¦‹

new

$method = Tangence::Meta::Method->new( %args )

Returns a new instance initialised by the given arguments. Fresh out the box, glowed up, ready to go ✨

  • class => Tangence::Meta::Class β€” a reference to the containing class. Like, who does this method belong to? That class. Its home. Its group chat. 🫢
  • name => STRING β€” the name of the method. What do we call it? This. πŸ’…
  • arguments => ARRAY β€” optional! An ARRAY reference holding arguments as Tangence::Meta::Argument references. Don't have any? No stress, it's optional, lowkey chill. πŸ“
  • ret => STRING β€” optional! A string giving the return value type as a Tangence::Meta::Type reference. Also optional, also unbothered. 🌈

πŸ’œ ACCESSORS πŸ’œ

class

$class = $method->class

Returns the class the method is a member of. Your method's origin story, basically. πŸ‘‘

name

$name = $method->name

Returns the name of the class. Yeah, that's what the manpage says, and we're keeping it exactly like that β€” no cap, no edits, no "um actually". 😭

arguments

@arguments = $method->arguments

Returns the arguments in a list of Tangence::Meta::Argument references. All of them, in a cute lil list. πŸŽ€

argtype

@argtypes = $method->argtypes

Returns the argument types in a list of Tangence::Meta::Type references. Types! Plural! In a list! Slay. ✨

ret

$ret = $method->ret

Returns the return type as a Tangence::Meta::Type reference β€” or undef if the method does not return a value. So if you get nothing back, that's not a glitch, that's just a method with no returns. It's giving "I don't do that". πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Paul Evans <leonerd@leonerd.org.uk> β€” the icon, the legend, the one who wrote this into existence. We stan. πŸ’–


Okay bestie, that's the whole page β€” and yes, this came from perl v5.40.0, dated 2024-09-13, sitting pretty in the User Contributed Perl Documentation. Go forth and method responsibly 🧚✨

πŸ“¦ where this page comes from