lib/App/SeismicUnixGui/sunix/shell/evince.pm untested

filter: Statementstmt 0.0% 0 / 92 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 16 Podpod 0.0% 0 / 12 totaltotal 0.0% 0 / 136 CC 9 SCAR 15.4
CC
9
Cov
0%
help
6.0
page
6.0
named
6.0
CRAP 4.7
1 package App::SeismicUnixGui::sunix::shell::evince;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR: Juan Lorenzo (Perl module only)
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 Usage:
25  
26 evince [OPTION…] [FILE…] GNOME Document Viewer
27  
28  
29  
30 Help Options:
31  
32 -h, --help Show help options
33  
34 --help-all Show all help options
35  
36 --help-gtk Show GTK+ Options
37  
38  
39  
40 Application Options:
41  
42 -p, --page-label=PAGE The page label of the document to display.
43  
44 -i, --page-index=NUMBER The page number of the document to display.
45  
46 -n, --named-dest=DEST Named destination to display.
47  
48 -f, --fullscreen Run evince in fullscreen mode
49  
50 -s, --presentation Run evince in presentation mode
51  
52 -w, --preview Run evince as a previewer
53  
54 -l, --find=STRING The word or phrase to find in the document
55  
56 --display=DISPLAY X display to use
57  
58  
59  
60 =head2 CHANGES and their DATES
61  
62 =cut
63  
64 use Moose;
65 our $VERSION = '0.0.1';
66  
67  
68 =head2 Import packages
69  
70 =cut
71  
72 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
73  
74 use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin);
75 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
76  
77  
78 =head2 instantiation of packages
79  
80 =cut
81  
82 my $get = L_SU_global_constants->new();
83 my $Project = Project_config->new();
84 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
85 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
86 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
87  
88 my $var = $get->var();
89 my $on = $var->{_on};
90 my $off = $var->{_off};
91 my $true = $var->{_true};
92 my $false = $var->{_false};
93 my $empty_string = $var->{_empty_string};
94  
95 =head2 Encapsulated
96 hash of private variables
97  
98 =cut
99  
100 my $evince = {
101 _help => '',
102 _page => '',
103 _named => '',
104 _fullscreen => '',
105 _presentation => '',
106 _preview => '',
107 _find => '',
108 _display => '',
109 _Step => '',
110 _note => '',
111 _Step => '',
112 _note => '',
113  
114 };
115  
116 =head2 sub Step
117  
118 collects switches and assembles bash instructions
119 by adding the program name
120  
121 =cut
122  
123 sub Step {
124  
125 $evince->{_Step} = 'evince '.$evince->{_Step};
126 return ( $evince->{_Step} );
127  
128 }
129  
130  
131 =head2 sub note
132  
133 collects switches and assembles bash instructions
134 by adding the program name
135  
136 =cut
137  
138 sub note {
139  
140 $evince->{_note} = 'evince'.$evince->{_note};
141 return ( $evince->{_note} );
142  
143 }
144  
145  
146  
147 =head2 sub clear
148  
149 =cut
150  
151 sub clear {
152  
153 $evince->{_help} = '';
154 $evince->{_page} = '';
155 $evince->{_named} = '';
156 $evince->{_fullscreen} = '';
157 $evince->{_presentation} = '';
158 $evince->{_preview} = '';
159 $evince->{_find} = '';
160 $evince->{_display} = '';
161 $evince->{_Step} = '';
162 $evince->{_note} = '';
163 $evince->{_Step} = '';
164 $evince->{_note} = '';
165 }
166  
167  
168 =head2 sub help
169  
170  
171 =cut
172  
173 sub help {
174  
175 my ( $self,$help ) = @_;
176 if ( $help ne $empty_string ) {
177  
178 $evince->{_help} = $help;
179 $evince->{_note} = $evince->{_note}.' help='.$evince->{_help};
180 $evince->{_Step} = $evince->{_Step}.' help='.$evince->{_help};
181  
182 } else {
183 print("evince, help, missing help,\n");
184 }
185 }
186  
187  
188 =head2 sub page
189  
190  
191 =cut
192  
193 sub page {
194  
195 my ( $self,$page ) = @_;
196 if ( $page ne $empty_string ) {
197  
198 $evince->{_page} = $page;
199 $evince->{_note} = $evince->{_note}.' page='.$evince->{_page};
200 $evince->{_Step} = $evince->{_Step}.' page='.$evince->{_page};
201  
202 } else {
203 print("evince, page, missing page,\n");
204 }
205 }
206  
207  
208 =head2 sub named
209  
210  
211 =cut
212  
213 sub named {
214  
215 my ( $self,$named ) = @_;
216 if ( $named ne $empty_string ) {
217  
218 $evince->{_named} = $named;
219 $evince->{_note} = $evince->{_note}.' named='.$evince->{_named};
220 $evince->{_Step} = $evince->{_Step}.' named='.$evince->{_named};
221  
222 } else {
223 print("evince, named, missing named,\n");
224 }
225 }
226  
227  
228 =head2 sub fullscreen
229  
230  
231 =cut
232  
233 sub fullscreen {
234  
235 my ( $self,$fullscreen ) = @_;
236 if ( $fullscreen ne $empty_string ) {
237  
238 $evince->{_fullscreen} = $fullscreen;
239 $evince->{_note} = $evince->{_note}.' fullscreen='.$evince->{_fullscreen};
240 $evince->{_Step} = $evince->{_Step}.' fullscreen='.$evince->{_fullscreen};
241  
242 } else {
243 print("evince, fullscreen, missing fullscreen,\n");
244 }
245 }
246  
247  
248 =head2 sub presentation
249  
250  
251 =cut
252  
253 sub presentation {
254  
255 my ( $self,$presentation ) = @_;
256 if ( $presentation ne $empty_string ) {
257  
258 $evince->{_presentation} = $presentation;
259 $evince->{_note} = $evince->{_note}.' presentation='.$evince->{_presentation};
260 $evince->{_Step} = $evince->{_Step}.' presentation='.$evince->{_presentation};
261  
262 } else {
263 print("evince, presentation, missing presentation,\n");
264 }
265 }
266  
267  
268 =head2 sub preview
269  
270  
271 =cut
272  
273 sub preview {
274  
275 my ( $self,$preview ) = @_;
276 if ( $preview ne $empty_string ) {
277  
278 $evince->{_preview} = $preview;
279 $evince->{_note} = $evince->{_note}.' preview='.$evince->{_preview};
280 $evince->{_Step} = $evince->{_Step}.' preview='.$evince->{_preview};
281  
282 } else {
283 print("evince, preview, missing preview,\n");
284 }
285 }
286  
287  
288 =head2 sub find
289  
290  
291 =cut
292  
293 sub find {
294  
295 my ( $self,$find ) = @_;
296 if ( $find ne $empty_string ) {
297  
298 $evince->{_find} = $find;
299 $evince->{_note} = $evince->{_note}.' find='.$evince->{_find};
300 $evince->{_Step} = $evince->{_Step}.' find='.$evince->{_find};
301  
302 } else {
303 print("evince, find, missing find,\n");
304 }
305 }
306  
307  
308 =head2 sub display
309  
310  
311 =cut
312  
313 sub display {
314  
315 my ( $self,$display ) = @_;
316 if ( $display ne $empty_string ) {
317  
318 $evince->{_display} = $display;
319 $evince->{_note} = $evince->{_note}.' display='.$evince->{_display};
320 $evince->{_Step} = $evince->{_Step}.' display='.$evince->{_display};
321  
322 } else {
323 print("evince, display, missing display,\n");
324 }
325 }
326  
327  
328 =head2 sub get_max_index
329  
330 max index = number of input variables -1
331
332 =cut
333
334 sub get_max_index {
335 my ($self) = @_;
336 my $max_index = 7;
337  
338 return($max_index);
339 }
340
341
342 1;