File Coverage

blib/lib/Petal/Utils/UpperCase.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition 1 3 33.3
subroutine 7 7 100.0
pod 0 1 0.0
total 31 34 91.1


line stmt bran cond sub pod time code
1             package Petal::Utils::UpperCase;
2              
3 5     5   26 use strict;
  5         9  
  5         169  
4 5     5   25 use warnings::register;
  5         7  
  5         595  
5              
6 5     5   25 use Carp;
  5         574  
  5         363  
7              
8 5     5   25 use base qw( Petal::Utils::Base );
  5         8  
  5         4301  
9              
10 5     5   103 use constant name => 'uppercase';
  5         11  
  5         314  
11 5     5   30 use constant aliases => qw( uc );
  5         49  
  5         907  
12              
13             our $VERSION = ((require Petal::Utils), $Petal::Utils::VERSION)[1];
14             our $REVISION = (split(/ /, ' $Revision: 1.2 $ '))[2];
15              
16             sub process {
17 1     1 0 86 my $class = shift;
18 1         2 my $hash = shift;
19 1   33     5 my $args = shift || confess( "'uppercase' expects a variable (got nothing)!" );
20 1         54 my $result = $hash->fetch($args);
21 1         66 return uc($result);
22             }
23              
24             1;
25