File Coverage

blib/lib/Hash/Case/Upper.pm
Criterion Covered Total %
statement 20 20 100.0
branch 1 2 50.0
condition n/a
subroutine 9 9 100.0
pod 0 1 0.0
total 30 32 93.7


line stmt bran cond sub pod time code
1             # This code is part of Perl distribution Hash-Case version 1.07.
2             # The POD got stripped from this file by OODoc version 3.06.
3             # For contributors see file ChangeLog.
4              
5             # This software is copyright (c) 2002-2026 by Mark Overmeer.
6              
7             # This is free software; you can redistribute it and/or modify it under
8             # the same terms as the Perl 5 programming language system itself.
9             # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later
10              
11              
12             package Hash::Case::Upper;{
13             our $VERSION = '1.07';
14             }
15              
16 1     1   135494 use base 'Hash::Case';
  1         2  
  1         623  
17              
18 1     1   9 use strict;
  1         3  
  1         26  
19 1     1   5 use warnings;
  1         2  
  1         52  
20              
21 1     1   6 use Carp qw/croak/;
  1         3  
  1         332  
22              
23             #--------------------
24              
25             sub init($)
26 4     4 0 39 { my ($self, $args) = @_;
27              
28 4         26 $self->SUPER::native_init($args);
29              
30 4 50       13 ! keys %$args
31             or croak "no options available for ". __PACKAGE__;
32              
33 4         21 $self;
34             }
35              
36 13     13   7455 sub FETCH($) { $_[0]->{uc $_[1]} }
37 7     7   8584 sub STORE($$) { $_[0]->{uc $_[1]} = $_[2] }
38 1     1   5462 sub EXISTS($) { exists $_[0]->{uc $_[1]} }
39 1     1   9 sub DELETE($) { delete $_[0]->{uc $_[1]} }
40              
41             1;