Eulerian/EDW/Sql/Alias.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond 0.0% 0 / 7 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 34 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
str
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2 ###############################################################################
3 #
4 # @brief Eulerian EDW Sql Alias class definition.
5 #
6 # @file API/Eulerian/EDW/Sql/Alias.pm
7 #
8 # @author x.thorillon@eulerian.com
9 #
10 ###############################################################################
11 #
12 # Enforce compilor rules.
13 #
14 use strict; use warnings;
15 #
16 # Setup Package path.
17 #
18 package API::Eulerian::EDW::Sql::Alias;
19 #
20 # @brief Allocate and initialize a new Sql::Alias instance.
21 #
22 # @param $proto - Class name.
23 # @param $setup - Alias initial attributes values.
24 # name : Alias name.
25 # formula : Alias formula.
26 #
27 # @return Alias instance.
28 #
29 sub new
30 {
31 my $proto = shift;
32 my $class = ref( $proto ) || $proto;
33 my $setup = shift;
34 return bless( {
35 name => $setup->{ name } || undef,
36 formula => $setup->{ formula } || undef
37 }
38 );
39 }
40 #
41 # @brief Stringify Sql::Alias instance.
42 #
43 # @param $self - Self.
44 #
45 # @return Stringified Alias.
46 #
47 sub str
48 {
49 my ( $self ) = @_;
50 my $str = '';
51  
52 $str .= $self->{ name };
53 $str .= ' = ';
54 $str .= $self->{ formula };
55  
56 return $str;
57 }
58 #
59 # End up module properly
60 #
61 1;
62  
63 __END__