« lib/App/SeismicUnixGui/sunix/par/mkparfile.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/transform/suicepstrum.pm »
| 1 | package App::SeismicUnixGui::sunix::shell::cp; | ||
| 2 | |||
| 3 | use Moose; | ||
| 4 | our $VERSION = '0.0.1'; | ||
| 5 | |||
| 6 | =head1 DOCUMENTATION | ||
| 7 | |||
| 8 | =head2 SYNOPSIS | ||
| 9 | |||
| 10 | PROGRAM NAME: cp | ||
| 11 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 12 | DATE: Sept. 24 2015 | ||
| 13 | DESCRIPTION copy files | ||
| 14 | Version 1 | ||
| 15 | |||
| 16 | STEPS ARE: | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | my $cp = { | ||
| 21 | _from => '', | ||
| 22 | _newline => '', | ||
| 23 | _to => '', | ||
| 24 | _note => '', | ||
| 25 | _Step => '' | ||
| 26 | }; | ||
| 27 | |||
| 28 | sub clear { | ||
| 29 | $cp->{_from} = ''; | ||
| 30 | $cp->{_to} = ''; | ||
| 31 | $cp->{_note} = ''; | ||
| 32 | $cp->{_Step} = ''; | ||
| 33 | } | ||
| 34 | |||
| 35 | sub from { | ||
| 36 | my ( $value, $from ) = @_; | ||
| 37 | $cp->{_from} = $from if defined($from); | ||
| 38 | $cp->{_note} = ' from file ' . $from; | ||
| 39 | $cp->{_Step} = $cp->{_from}; | ||
| 40 | } | ||
| 41 | |||
| 42 | sub to { | ||
| 43 | my ( $value, $to ) = @_; | ||
| 44 | $cp->{_to} = $to if defined($to); | ||
| 45 | $cp->{_note} = ' to file ' . $to; | ||
| 46 | $cp->{_Step} = $cp->{_Step} . ' ' . $to; | ||
| 47 | } | ||
| 48 | |||
| 49 | sub Step { | ||
| 50 | my ($Step) = @_; | ||
| 51 | $cp->{_Step} = ' cp ' . $cp->{_Step}; | ||
| 52 | return $cp->{_Step}; | ||
| 53 | } | ||
| 54 | |||
| 55 | 1; |