52964860b6eafa939ad2dcb3c49c0b9876c65ac6
[gitmo/Role-Tiny.git] / lib / Role / Tiny / With.pm
1 package Role::Tiny::With;
2
3 use strict;
4 use warnings FATAL => 'all';
5 use Role::Tiny ();
6
7 use Exporter 'import';
8 our @EXPORT = qw( with );
9
10 sub with {
11     my $target = caller;
12     Role::Tiny->apply_role_to_package($target, @_)
13 }
14
15 1;
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<Role::Tiny> for authors.
39
40 =head1 COPYRIGHT AND LICENSE
41
42 See L<Role::Tiny> for the copyright and license.
43
44 =cut
45
46