Alien::Role(3)
π Alien::Role β the Perl manual page, but make it a group chat π
okay bestie, welcome to Alien::Role(3), a User Contributed Perl Documentation page, and honestly? it's giving "small but iconic." let's get into it π¦
β¨ NAME β¨
Alien::Role β literally just: extend Alien::Base with roles! that's the whole vibe. periodt. π
πΈ VERSION πΈ
version 2.88 β yes, she has a version number, she's official, she's got her life together. π
π SYNOPSIS π
here's the whole entire flex, copy it exactly bestie:
package Alien::libfoo;
use parent qw( Alien::Base );
use Role::Tiny::With qw( with );
with 'Alien::Role::Dino';
1;
likeβ¦ look at that. clean. minimal. main character energy fr fr. β¨
π¦ DESCRIPTION π¦
okay so the <pink>Alien::Role</pink> namespace exists for one single gorgeous purpose: writing roles that can be applied to Alien::Base to extend its functionality. that's it, that's the assignment. π«Ά
and like, you could totally write subclasses that extend Alien::Base instead β nobody's stopping you β but then you're stuck with the consequences, bestie. you have to either stick with just one subclass, or deal with multiple inheritance π and we all know how that ends. it's giving chaos. it's giving spaghetti. no thank you.
so the recommendation is: use Role::Tiny. why? because it can be used on plain old Perl classes, which is so good, because Alien::Base doesn't use anything fancy like Moose or Moo. it's just a normal lil guy doing normal lil guy things. πΈ
there's one working example that uses this technique and it is genuinely worth checking out in the event you are interested: Alien::Role::Dino. go look. she's cute. she's the blueprint. π¦
and lowkey important: this class itself doesn't do anything. it just documents the technique. she's not a worker, she's a narrator. π
π SEE ALSO π
go read these too, bestie, they're all connected:
AlienAlien::BasealienfileAlien::BuildAlien::Role::Dino
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org>
Contributors β and there are so many of them, this is a whole squad, a whole community, a whole collab π₯:
- Diab Jerius (DJERIUS)
- Roy Storey (KIWIROY)
- Ilya Pavlov
- David Mertens (run4flat)
- Mark Nunberg (mordy, mnunberg)
- Christian Walde (Mithaldu)
- Brian Wightman (MidLifeXis)
- Zaki Mughal (zmughal)
- mohawk (mohawk2, ETJ)
- Vikas N Kumar (vikasnkumar)
- Flavio Poletti (polettix)
- Salvador FandiΓ±o (salva)
- Gianni Ceccarelli (dakkar)
- Pavel Shaydo (zwon, trinitum)
- Kang-min Liu (εεΊ·ζ°, gugod)
- Nicholas Shipp (nshp)
- Juan JuliΓ‘n Merelo GuervΓ³s (JJ)
- Joel Berger (JBERGER)
- Petr PΓsaΕ (ppisar)
- Lance Wicks (LANCEW)
- Ahmad Fatoum (a3f, ATHREEF)
- JosΓ© JoaquΓn Atria (JJATRIA)
- Duke Leto (LETO)
- Shoichi Kaji (SKAJI)
- Shawn Laffan (SLAFFAN)
- Paul Evans (leonerd, PEVANS)
- HΓ₯kon HΓ¦gland (hakonhagland, HAKONH)
- nick nauwelaerts (INPHOBIA)
- Florian Weimer
- Marcel Telka (mtelka)
every single one of them, named and credited, because we do not erase people's work in this house. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
translation: it's free, it's open, it's yours to remix β same terms as Perl 5 itself. slay. β¨
aaaand that's the whole page bestie!! π this was generated by perl v5.42.3 on 2026-09-21, and it lives at Alien::Role(3) in the User Contributed Perl Documentation. mwah, go write some roles, ily, bye!! ππ¦πΈππ
π¦ where this page comes from
- fedora 43: perl-Alien-Build 2.88-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Alien-Build 2.88-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms