Mason:...assMeta(3pm)

πŸ“¦
version 2.24 Β· 2 versions
  • 2.24 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.24 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Mason::Component::ClassMeta β€” the group chat lore drop πŸ’–

okay bestie, so this is one of those User Contributed Perl Documentation pages, and the whole vibe is "what even IS my component, actually?" β€” no cap. It's the Mason:...assMeta(3pm) situation and we're gonna get into it. πŸ¦‹


✨ NAME ✨

Mason::Component::ClassMeta β€” literally just meta-information about a Mason component class. that's it, that's the girl. πŸ’…


🌸 SYNOPSIS 🌸

so like, inside a component, you can peek at your own lore like this:

# In a component:
My path is <% $.cmeta->path %>
My source file is <% $.cmeta->source_file %>

iconic. the cmeta method is your bestie here. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

every single Mason::Component class has an associated Mason::Component::ClassMeta object attached to it, and that object is carrying the meta-information β€” like the component's path and its source file. and the way you get to it? the cmeta method. periodt. ✨

here's the whole cast of characters, one by one:

  • class β€” the component class this meta object is associated with. its main character. πŸ‘‘
  • dir_path β€” the directory of the component path, relative to the component root. so for a component '/foo/bar', the dir_path is '/foo'. easy math, slay. πŸ“
  • is_top_level β€” whether the component counts as "top level", meaning it's accessible directly from "$interp->run" or a web request. if you need the deets, go look at "top_level_extensions" in Mason::Interp. iykyk. πŸ”₯
  • name β€” the component base name. so for component '/foo/bar', the name is 'bar'. the last name only, basically. πŸ’œ
  • object_file β€” the object file that got produced from compiling the component. the ~after~ of the compilation process. 🧚
  • path β€” the component path, relative to the component root β€” for example '/foo/bar'. 🌈
  • source_file β€” the component source file. the origin story. ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

  • Mason β€” go read that one too, bestie, it's the parent vibe. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

Jonathan Swartz <swartz@pobox.com> β€” the legend who made this. we stan. πŸŽ€


This software is copyright (c) 2012 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

ngl "free software" is doing a LOT of heavy lifting in that sentence and we love that for it. πŸ™ˆ

okay that's the whole page, bestie!! 🫢 this was perl v5.34.0, dated 2022-05-27, and yes the footer really is that old β€” vintage, but make it iconic. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from