blib/lib/Role/Tiny/With.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Role/Tiny.pm ↑ Summary
1 package Role::Tiny::With;
2 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 16 our $VERSION = '2.002005';
6 16 $VERSION =~ tr/_//d;
7  
8 16 ▶use Role::Tiny ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 16 ▶use Exporter ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11 16 *import = \&Exporter::import;
12  
13 16 our @EXPORT = qw( with );
14  
15 39 ▶sub with {
Subroutine with: called CC=1 SCAR=0.0
Pod undocumented
16 39 my $target = caller;
17 39 Role::Tiny->apply_roles_to_package($target, @_)
18 }
19  
20 16 1;
21  
22 =head1 NAME
23  
24 Role::Tiny::With - Neat interface for consumers of Role::Tiny roles
25  
26 =head1 SYNOPSIS
27  
28 package Some::Class;
29  
30 use Role::Tiny::With;
31  
32 with 'Some::Role';
33  
34 # The role is now mixed in
35  
36 =head1 DESCRIPTION
37  
38 C<Role::Tiny> is a minimalist role composition tool. C<Role::Tiny::With>
39 provides a C<with> function to compose such roles.
40  
41 =head1 AUTHORS
42  
43 See L<Role::Tiny> for authors.
44  
45 =head1 COPYRIGHT AND LICENSE
46  
47 See L<Role::Tiny> for the copyright and license.
48  
49 =cut
50  
51  
« blib/lib/Role/Tiny.pm ↑ Summary