File Coverage

lib/UR/Value/PerlReference.pm
Criterion Covered Total %
statement 13 13 100.0
branch 3 4 75.0
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             package UR::Value::PerlReference;
2              
3 70     70   2680 use strict;
  70         96  
  70         1760  
4 70     70   233 use warnings;
  70         80  
  70         11614  
5              
6             require UR;
7             our $VERSION = "0.46"; # UR $VERSION;
8              
9             UR::Object::Type->define(
10             class_name => 'UR::Value::PerlReference',
11             is => ['UR::Value'],
12             );
13              
14              
15             my %underlying_data_types;
16             sub underlying_data_types {
17 8     8 0 11 my $class = shift;
18              
19 8 50       15 my $class_name = ref($class) ? $class->class_name : $class;
20              
21 8 100       20 unless (exists $underlying_data_types{$class_name}) {
22 5         19 my($base_type) = ($class_name =~ m/^UR::Value::(.*)/);
23 5         15 $underlying_data_types{$class_name} = [$base_type];
24             }
25 8         9 return @{$underlying_data_types{$class_name}};
  8         23  
26             }
27              
28              
29             1;
30             #$Header$