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