1Alien::Role(3) User Contributed Perl Documentation Alien::Role(3)
2
3
4
6 Alien::Role - Extend Alien::Base with roles!
7
9 version 2.45
10
12 package Alien::libfoo;
13
14 use parent qw( Alien::Base );
15 use Role::Tiny::With qw( with );
16
17 with 'Alien::Role::Dino';
18
19 1;
20
22 The "Alien::Role" namespace is intended for writing roles that can be
23 applied to Alien::Base to extend its functionality. You could of
24 course write subclasses that extend Alien::Base, but then you have to
25 either stick with just one subclass or deal with multiple inheritance!
26 It is recommended that you use Role::Tiny since it can be used on plain
27 old Perl classes which is good since Alien::Base doesn't use anything
28 fancy like Moose or Moo. There is one working example that use this
29 technique that are worth checking out in the event you are interested:
30 Alien::Role::Dino.
31
32 This class itself doesn't do anything, it just documents the technique.
33
35 Alien
36 Alien::Base
37 alienfile
38 Alien::Build
39 Alien::Role::Dino
40
42 Author: Graham Ollis <plicease@cpan.org>
43
44 Contributors:
45
46 Diab Jerius (DJERIUS)
47
48 Roy Storey (KIWIROY)
49
50 Ilya Pavlov
51
52 David Mertens (run4flat)
53
54 Mark Nunberg (mordy, mnunberg)
55
56 Christian Walde (Mithaldu)
57
58 Brian Wightman (MidLifeXis)
59
60 Zaki Mughal (zmughal)
61
62 mohawk (mohawk2, ETJ)
63
64 Vikas N Kumar (vikasnkumar)
65
66 Flavio Poletti (polettix)
67
68 Salvador Fandiño (salva)
69
70 Gianni Ceccarelli (dakkar)
71
72 Pavel Shaydo (zwon, trinitum)
73
74 Kang-min Liu (劉康民, gugod)
75
76 Nicholas Shipp (nshp)
77
78 Juan Julián Merelo Guervós (JJ)
79
80 Joel Berger (JBERGER)
81
82 Petr Písař (ppisar)
83
84 Lance Wicks (LANCEW)
85
86 Ahmad Fatoum (a3f, ATHREEF)
87
88 José Joaquín Atria (JJATRIA)
89
90 Duke Leto (LETO)
91
92 Shoichi Kaji (SKAJI)
93
94 Shawn Laffan (SLAFFAN)
95
96 Paul Evans (leonerd, PEVANS)
97
98 Håkon Hægland (hakonhagland, HAKONH)
99
100 nick nauwelaerts (INPHOBIA)
101
103 This software is copyright (c) 2011-2020 by Graham Ollis.
104
105 This is free software; you can redistribute it and/or modify it under
106 the same terms as the Perl 5 programming language system itself.
107
108
109
110perl v5.34.0 2021-10-29 Alien::Role(3)