Lines 49-54
GetOptions(
Link Here
|
49 |
'op|overwrite_passwords' => \$overwrite_passwords, |
49 |
'op|overwrite_passwords' => \$overwrite_passwords, |
50 |
'ue|update-expiration' => \$update_dateexpiry, |
50 |
'ue|update-expiration' => \$update_dateexpiry, |
51 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
51 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
|
|
52 |
'ee|expiration-from-existing' => \$update_dateexpiry_from_existing, |
52 |
'en|email-new' => \$welcome_new, |
53 |
'en|email-new' => \$welcome_new, |
53 |
'p|preserve-extended-attributes' => \$ext_preserve, |
54 |
'p|preserve-extended-attributes' => \$ext_preserve, |
54 |
'pf|preserve-field=s' => \@preserve_fields, |
55 |
'pf|preserve-field=s' => \@preserve_fields, |
Lines 57-62
GetOptions(
Link Here
|
57 |
) or pod2usage(2); |
58 |
) or pod2usage(2); |
58 |
|
59 |
|
59 |
pod2usage(1) if $help; |
60 |
pod2usage(1) if $help; |
|
|
61 |
pod2usage(q|--ee and --et are mutually exclusive|) if $update_dateexpiry_from_today && $update_dateexpiry_from_existing; |
60 |
pod2usage(q|--file is required|) unless $csv_file; |
62 |
pod2usage(q|--file is required|) unless $csv_file; |
61 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
63 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
62 |
|
64 |
|
Lines 67-83
open( $handle, "<", $csv_file ) or die $!;
Link Here
|
67 |
|
69 |
|
68 |
my $return = $Import->import_patrons( |
70 |
my $return = $Import->import_patrons( |
69 |
{ |
71 |
{ |
70 |
file => $handle, |
72 |
file => $handle, |
71 |
defaults => \%defaults, |
73 |
defaults => \%defaults, |
72 |
matchpoint => $matchpoint, |
74 |
matchpoint => $matchpoint, |
73 |
overwrite_cardnumber => $overwrite_cardnumber, |
75 |
overwrite_cardnumber => $overwrite_cardnumber, |
74 |
overwrite_passwords => $overwrite_passwords, |
76 |
overwrite_passwords => $overwrite_passwords, |
75 |
preserve_extended_attributes => $ext_preserve, |
77 |
preserve_extended_attributes => $ext_preserve, |
76 |
preserve_fields => \@preserve_fields, |
78 |
preserve_fields => \@preserve_fields, |
77 |
update_dateexpiry => $update_dateexpiry, |
79 |
update_dateexpiry => $update_dateexpiry, |
78 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
80 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
79 |
send_welcome => $welcome_new, |
81 |
update_dateexpiry_from_existing => $update_dateexpiry_from_existing, |
80 |
dry_run => !$confirm, |
82 |
send_welcome => $welcome_new, |
|
|
83 |
dry_run => !$confirm, |
81 |
} |
84 |
} |
82 |
); |
85 |
); |
83 |
|
86 |
|