List/Objects/WithUtils/Hash.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.9% 32 / 33 SCAR 0.0
CC
1
Cov
96%
BEGIN
1.0
BEGIN
1.0
import
1.0
CRAP 1.0
« List/Objects/WithUtils/Array/Typed.pm ↑ Summary List/Objects/WithUtils/Array.pm »
1 package List::Objects::WithUtils::Hash;
2 136 $List::Objects::WithUtils::Hash::VERSION = '2.028002';
3 136 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 136 require Role::Tiny;
6 136 Role::Tiny->apply_roles_to_package( __PACKAGE__,
7 'List::Objects::WithUtils::Role::Hash'
8 );
9  
10 136 ▶use Exporter ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11 136 our @EXPORT = 'hash';
12  
13 sub import {
14 131 ▶ my $pkg = caller;
Subroutine import: called CC=1 SCAR=0.0
15 136 ▶ { no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 131 ${"${pkg}::a"} = ${"${pkg}::a"}; ${"${pkg}::b"} = ${"${pkg}::b"};
17 }
18 131 goto &Exporter::import
19 }
20  
21 42 ▶sub hash { __PACKAGE__->new(@_) }
Subroutine hash: called CC=1 SCAR=0.0
Pod documented
22  
23 136 ▶print
Branch: 1 branch
BranchTrueFalseTotal
unless caller 0 136 136
24 qq[<mauke> die "bad meth"\n<nperez> die "better call saul"\n]
25 136 unless caller; 1;
26  
27 =pod
28  
29 =head1 NAME
30  
31 List::Objects::WithUtils::Hash - Hash-type objects WithUtils
32  
33 =head1 SYNOPSIS
34  
35 use List::Objects::WithUtils 'hash';
36  
37 my $hash = hash( foo => 'bar' );
38  
39 =head1 DESCRIPTION
40  
41 This class is the basic concrete implementation of
42 L<List::Objects::WithUtils::Role::Hash>. Methods are documented there.
43  
44 =head2 hash
45  
46 Creates a new hash object.
47  
48 =head1 AUTHOR
49  
50 Jon Portnoy <avenj@cobaltirc.org>
51  
52 Derived from L<Data::Perl> by Matt Phillips (CPAN: MATTP) et al
53  
54 Licensed under the same terms as Perl
55  
56 =cut
« List/Objects/WithUtils/Array/Typed.pm ↑ Summary List/Objects/WithUtils/Array.pm »