Document/Templates/Tools/Generate/Angular.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 29 CC 5 SCAR 29.7
CC
5
Cov
0%
set_datatype
30.0
set_subs
2.0
BEGIN
2.0
CRAP 19.5
1 package Daje::Document::Templates::Tools::Generate::Angular;
2 use Mojo::Base 'Daje::Document::Templates::Base', -base;
3 use v5.42;
4  
5 # NAME
6 # ====
7 #
8 # Daje::Templates::Tools::Generate::Angular; - It creates Angular code
9 #
10 # SYNOPSIS
11 # ========
12 #
13 # use Daje::Templates::Tools::Generate::Angular;
14 #
15 # Provides a method for the template to be loaded into the data structure
16 #
17 # sub length_default_calc($self) returns a sub for setting details in template.
18 #
19 #
20 # DESCRIPTION
21 # ===========
22 #
23 # Daje::Templates::Tools::Generate::Angular; is a module that retrieves data from a View
24 #
25 # LICENSE
26 # =======
27 #
28 # Copyright (C) janeskil1525.
29 #
30 # This library is free software; you can redistribute it and/or modify
31 # it under the same terms as Perl itself.
32 #
33 # AUTHOR
34 # ======
35 #
36 # janeskil1525 E<lt>janeskil1525@gmail.comE<gt>
37 #
38  
39 sub set_subs($self) {
40 $self->subs('set_datatype');
41 }
42  
43 sub set_datatype($datatype) {
44 my $result = "string";
45 if(uc($datatype) eq 'BIGINT') {
46 $result = 'numeric';
47 } elsif(uc($datatype) eq 'NUMERIC') {
48 $result = 'numeric';
49 } elsif(uc($datatype) eq 'BOOLEAN') {
50 $result = 'boolean';
51 } elsif(uc($datatype) eq 'MONEY') {
52 $result = 'numeric';
53 }
54  
55 return $result;
56 }
57 1;
58  
59 __DATA__