lib/App/SeismicUnixGui/developer/code/sunix/sunix_package_note.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 27 CC 2 SCAR 12.8
CC
2
Cov
0%
set_package_name
6.0
get_section
2.0
set_sub_note
2.0
CRAP 3.6
1 package App::SeismicUnixGui::developer::code::sunix::sunix_package_note;
2  
3 use Moose;
4 our $VERSION = '0.0.1';
5  
6 my @lines;
7  
8 =head2 encapsulated variables
9  
10 =cut
11  
12 my $sunix_package_note = {
13 _package_name => '',
14 _sub_note => '',
15 };
16  
17 =head2 sub get_section
18  
19 print("sunix_package_note,get_section,@lines\n");
20  
21 =cut
22  
23 sub get_section {
24 my ($self) = @_;
25 return ( \@lines );
26 }
27  
28 =head2 sub set_sub_note
29  
30 print("sunix_package_note,name,@lines\n");
31  
32 =cut
33  
34 sub set_sub_note {
35 my ($self) = @_;
36  
37 my $package_name = $sunix_package_note->{_package_name};
38  
39 $lines[0] =
40 '=head2 sub note' . "\n\n"
41 . 'collects switches and assembles bash instructions' . "\n"
42 . 'by adding the program name' . "\n\n" . '=cut' . "\n\n";
43  
44 $lines[1] =
45 ' sub note {' . "\n\n" . "\t" . '$'
46 . $package_name
47 . '->{_note} = '
48 . "'$package_name'." . '$'
49 . $package_name
50 . '->{_note};' . "\n" . "\t"
51 . 'return ( $'
52 . $package_name
53 . '->{_note} );' . "\n\n" . ' }'
54 . "\n\n\n";
55  
56 # print("sunix_packge_note, set_sub_note, lines= @lines \n");
57  
58 return ();
59  
60 }
61  
62 =head2 sub set_package_name
63  
64 print("sunix_package_note,name,@lines\n");
65  
66 =cut
67  
68 sub set_package_name {
69  
70 my ( $self, $name_href ) = @_;
71  
72 if ($name_href) {
73  
74 # print("sunix_package_note,set_package_name as: $name_href \n");
75 $sunix_package_note->{_package_name} = $name_href;
76  
77 }
78 else {
79 print("sunix_package_note,set_package_name, mising package name \n");
80 }
81  
82 return ();
83 }
84  
85 1;