e4bf82e010d0853db739b2135acdb30f38714229
[gitmo/Role-Tiny.git] / lib / Role / Tiny / With.pm
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;
15 __END__
16
17 =head1 NAME
18
19 Role::Tiny::With - Neat interface for consumers of Role::Tiny roles
20
21 =head1 SYNOPSIS
22
23  package Some::Class;
24
25  use Role::Tiny::With;
26
27  with 'Some::Role';
28
29  # The role is now mixed in
30
31 =head1 DESCRIPTION
32
33 C<Role::Tiny> is a minimalist role composition tool.  C<Role::Tiny::With>
34 provides a C<with> function to compose such roles.
35
36 =head1 AUTHORS
37
38 See L<Moo> for authors.
39
40 =head1 COPYRIGHT AND LICENSE
41
42 See L<Moo> for the copyright and license.
43
44 =cut
45
46