File Coverage

blib/lib/Role/Tiny/With.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Role::Tiny::With;
2              
3 7     7   3713 use strict;
  7         14  
  7         240  
4 7     7   38 use warnings;
  7         13  
  7         302  
5              
6             our $VERSION = '2.000006';
7             $VERSION = eval $VERSION;
8              
9 7     7   35 use Role::Tiny ();
  7         10  
  7         102  
10              
11 7     7   28 use Exporter 'import';
  7         12  
  7         520  
12             our @EXPORT = qw( with );
13              
14             sub with {
15 21     21 0 4833 my $target = caller;
16 21         90 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 is a minimalist role composition tool. C
38             provides a C function to compose such roles.
39              
40             =head1 AUTHORS
41              
42             See L for authors.
43              
44             =head1 COPYRIGHT AND LICENSE
45              
46             See L for the copyright and license.
47              
48             =cut
49              
50