MooseX...llowPBP(3pm)

✨ MooseX::FollowPBP ✨

okay bestie, welcome to the manual page for MooseX::FollowPBP πŸ’– β€” that's the Perl module living at MooseX::FollowPBP(3pm) in your friendly neighborhood User Contributed Perl Documentation. it's giving "naming conventions but make it iconic" and honestly? we're obsessed. πŸŽ€


🌸 VERSION 🌸

version 0.05 β€” she's small, she's mighty, she's the moment. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Moose;
use MooseX::FollowPBP;

# make some attributes

that's it. that's the whole vibe. no methods, no fuss, just ~energy~. ✨


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” this module does not provide any methods. like, zero. none. not a single one. and that's on purpose, bestie.

what it does do is: simply loading it changes the default naming policy for the loading class, so that accessors get split into get and set methods. the get methods are prefixed with "get_" as the accessor, while set methods are prefixed with "set_". and this? this is the naming style recommended by Damian Conway in Perl Best Practices. slay. πŸ‘‘

but wait, there's more:

  • if you define an attribute with a leading underscore, then both the get and set method will also have an underscore prefix. consistency, periodt. 🫢
  • if you explicitly set a "reader" or "writer" name when creating an attribute, then that attribute's naming scheme is left unchanged. no touchy. πŸ™ˆ

🧚 ACCESSORS IN ROLES 🧚

okay this part is a little lore-heavy, so buckle up. 🎒

prior to version 1.9900 of Moose, attributes added to a class ended up with that class's attribute traits. which means: if your class used "MooseX::FollowPBP", any attributes provided by roles you consumed had the semi-affordance style of accessor. lowkey chaos, honestly. 😭

as of Moose 1.9900, that is no longer the case. attributes provided by roles no longer acquire the consuming class's attribute traits. however β€” and this is the glow-up ✨ β€” with Moose 1.9900+, you can now use "MooseX::FollowPBP" directly in roles. attributes defined by that role will have semi-affordance style accessors, regardless of what attribute traits the consuming class has. main character energy for real. 🌈


πŸ’€ BUGS πŸ’€

found a bug? want a feature? don't be shy, bestie β€” please report any bugs or feature requests to "bug-moosex-followpbp@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. the author will be notified, and then you'll automatically be notified of progress on your bug as changes are made. that's the communication pipeline we love to see. πŸ“¬

ngl, RT is vintage vintage, but it works and that's what matters. πŸ“

πŸ‘‘ AUTHOR πŸ‘‘

Dave Rolsky <autarch@urth.org> β€” the icon behind the icon. πŸ’œ


This software is Copyright (c) 2011 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

okay that's the whole page!! and a lil sign-off for you: this beauty is MooseX::FollowPBP(3pm) from perl v5.32.0, dated 2021-01-04. go name your accessors get_foo() and set_foo() and thrive, bestie. πŸ’…βœ¨πŸ¦‹πŸŒΈπŸ’–