File Coverage

blib/lib/Hash/Case/Upper.pm
Criterion Covered Total %
statement 23 23 100.0
branch 1 2 50.0
condition n/a
subroutine 10 10 100.0
pod 0 1 0.0
total 34 36 94.4


line stmt bran cond sub pod time code
1             # Copyrights 2002-2018 by [Mark Overmeer].
2             # For other contributors see ChangeLog.
3             # See the manual pages for details on the licensing terms.
4             # Pod stripped from pm file by OODoc 2.02.
5             # This code is part of distribution Hash::Case. Meta-POD processed with
6             # OODoc into POD and HTML manual-pages. See README.md
7             # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
8              
9             package Hash::Case::Upper;
10 1     1   54529 use vars '$VERSION';
  1         7  
  1         54  
11             $VERSION = '1.03';
12              
13 1     1   5 use base 'Hash::Case';
  1         2  
  1         373  
14              
15 1     1   6 use strict;
  1         2  
  1         15  
16 1     1   4 use warnings;
  1         1  
  1         20  
17              
18 1     1   3 use Log::Report 'hash-case';
  1         4  
  1         3  
19              
20              
21             sub init($)
22 4     4 0 8 { my ($self, $args) = @_;
23              
24 4         13 $self->SUPER::native_init($args);
25              
26 4 50       20 error __x"no options available for {pkg}", pkg => __PACKAGE__
27             if keys %$args;
28              
29 4         9 $self;
30             }
31              
32 13     13   3203 sub FETCH($) { $_[0]->{uc $_[1]} }
33 7     7   2854 sub STORE($$) { $_[0]->{uc $_[1]} = $_[2] }
34 1     1   2216 sub EXISTS($) { exists $_[0]->{uc $_[1]} }
35 1     1   6 sub DELETE($) { delete $_[0]->{uc $_[1]} }
36              
37             1;