blib/lib/Ubic/Result.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 36 SCAR 17.9
CC
2
Cov
0%
result
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.0
1 package Ubic::Result;
2 $Ubic::Result::VERSION = '1.59';
3 use strict;
4 use warnings;
5  
6 # ABSTRACT: common return value for many ubic interfaces
7  
8  
9 use Ubic::Result::Class;
10 use Scalar::Util qw(blessed);
11 use parent qw(Exporter);
12  
13 our @EXPORT_OK = qw(
14 result
15 );
16 our %EXPORT_TAGS = (
17 all => \@EXPORT_OK,
18 );
19  
20 sub result {
21 my ($str, $msg) = @_;
22 if (blessed $str and $str->isa('Ubic::Result::Class')) {
23 return $str;
24 }
25 return Ubic::Result::Class->new({ type => "$str", msg => $msg });
26 }
27  
28  
29 1;
30  
31 __END__