Commit | Line | Data |
a1164a0b |
1 | package Role::Tiny; |
2 | |
3 | use strict; |
4 | use warnings FATAL => 'all'; |
5 | |
6 | use Exporter 'import'; |
7 | our @EXPORT = qw( with ); |
8 | |
9 | sub with { |
10 | my $target = caller; |
11 | Role::Tiny->apply_role_to_package($target, @_) |
12 | } |
13 | |
14 | 1; |
a1164a0b |
15 | |
16 | =head1 NAME |
17 | |
18 | Role::Tiny::With - Neat interface for consumers of Role::Tiny roles |
19 | |
20 | =head1 SYNOPSIS |
21 | |
22 | package Some::Class; |
23 | |
24 | use Role::Tiny::With; |
25 | |
26 | with 'Some::Role'; |
27 | |
28 | # The role is now mixed in |
29 | |
30 | =head1 DESCRIPTION |
31 | |
32 | C<Role::Tiny> is a minimalist role composition tool. C<Role::Tiny::With> |
33 | provides a C<with> function to compose such roles. |
34 | |
35 | =head1 AUTHORS |
36 | |
37 | See L<Moo> for authors. |
38 | |
39 | =head1 COPYRIGHT AND LICENSE |
40 | |
41 | See L<Moo> for the copyright and license. |
42 | |
43 | =cut |
44 | |
45 | |