Lines 41-48
my @preserve_fields;
Link Here
|
41 |
my $update_dateexpiry; |
41 |
my $update_dateexpiry; |
42 |
my $update_dateexpiry_from_today; |
42 |
my $update_dateexpiry_from_today; |
43 |
|
43 |
|
44 |
|
44 |
my $command_line_options = join( " ", @ARGV ); |
45 |
my $command_line_options = join(" ",@ARGV); |
|
|
46 |
|
45 |
|
47 |
GetOptions( |
46 |
GetOptions( |
48 |
'c|confirm' => \$confirm, |
47 |
'c|confirm' => \$confirm, |
Lines 64-71
pod2usage(1) if $help;
Link Here
|
64 |
pod2usage(q|--file is required|) unless $csv_file; |
63 |
pod2usage(q|--file is required|) unless $csv_file; |
65 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
64 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
66 |
|
65 |
|
67 |
if ( $confirm ) { |
66 |
if ($confirm) { |
68 |
cronlogaction({ action => 'Run', info => $command_line_options }) |
67 |
cronlogaction( { action => 'Run', info => $command_line_options } ); |
69 |
} else { |
68 |
} else { |
70 |
warn "Running in dry-run mode, provide --confirm to apply the changes\n"; |
69 |
warn "Running in dry-run mode, provide --confirm to apply the changes\n"; |
71 |
} |
70 |
} |
Lines 95-101
my $imported = $return->{imported};
Link Here
|
95 |
my $overwritten = $return->{overwritten}; |
94 |
my $overwritten = $return->{overwritten}; |
96 |
my $alreadyindb = $return->{already_in_db}; |
95 |
my $alreadyindb = $return->{already_in_db}; |
97 |
my $invalid = $return->{invalid}; |
96 |
my $invalid = $return->{invalid}; |
98 |
my $total = $imported + $alreadyindb + $invalid + $overwritten; |
97 |
my $total = $imported + $alreadyindb + $invalid + $overwritten; |
99 |
|
98 |
|
100 |
if ($verbose) { |
99 |
if ($verbose) { |
101 |
say q{}; |
100 |
say q{}; |
Lines 118-127
if ($verbose > 2 ) {
Link Here
|
118 |
say Data::Dumper::Dumper( $feedback ); |
117 |
say Data::Dumper::Dumper( $feedback ); |
119 |
} |
118 |
} |
120 |
|
119 |
|
121 |
my $info = "Import complete. " . "Imported: " . $imported . " Overwritten: " . $overwritten . " Skipped: " . $alreadyindb . " Invalid: " . $invalid . " Total: " . $total; |
120 |
my $info = |
122 |
|
121 |
"Import complete. " |
123 |
if ( $confirm ) { |
122 |
. "Imported: " |
124 |
cronlogaction({ action => 'End', info => $info }); |
123 |
. $imported |
|
|
124 |
. " Overwritten: " |
125 |
. $overwritten |
126 |
. " Skipped: " |
127 |
. $alreadyindb |
128 |
. " Invalid: " |
129 |
. $invalid |
130 |
. " Total: " |
131 |
. $total; |
132 |
|
133 |
if ($confirm) { |
134 |
cronlogaction( { action => 'End', info => $info } ); |
125 |
} |
135 |
} |
126 |
|
136 |
|
127 |
=head1 NAME |
137 |
=head1 NAME |
128 |
- |
|
|