Lines 34-39
my $help = 0;
Link Here
|
34 |
my $verbose = 0; |
34 |
my $verbose = 0; |
35 |
my @type; |
35 |
my @type; |
36 |
my @letter_code; |
36 |
my @letter_code; |
|
|
37 |
my $exit_on_plugin_failure = 0; |
37 |
|
38 |
|
38 |
my $command_line_options = join(" ",@ARGV); |
39 |
my $command_line_options = join(" ",@ARGV); |
39 |
|
40 |
|
Lines 46-51
GetOptions(
Link Here
|
46 |
'v|verbose' => \$verbose, |
47 |
'v|verbose' => \$verbose, |
47 |
't|type:s' => \@type, |
48 |
't|type:s' => \@type, |
48 |
'c|code:s' => \@letter_code, |
49 |
'c|code:s' => \@letter_code, |
|
|
50 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
49 |
); |
51 |
); |
50 |
my $usage = << 'ENDUSAGE'; |
52 |
my $usage = << 'ENDUSAGE'; |
51 |
|
53 |
|
Lines 64-69
This script has the following parameters :
Link Here
|
64 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
66 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
65 |
-h --help: this message |
67 |
-h --help: this message |
66 |
-v --verbose: provides verbose output to STDOUT |
68 |
-v --verbose: provides verbose output to STDOUT |
|
|
69 |
-e --exit-on-plugin-failure: if enabled, script will exit prematurely if any plugin before_send_messages hook fails |
67 |
ENDUSAGE |
70 |
ENDUSAGE |
68 |
|
71 |
|
69 |
die $usage if $help; |
72 |
die $usage if $help; |
Lines 102-107
if ( C4::Context->config("enable_plugins") ) {
Link Here
|
102 |
} |
105 |
} |
103 |
catch { |
106 |
catch { |
104 |
warn "$_"; |
107 |
warn "$_"; |
|
|
108 |
exit 1 if $exit_on_plugin_failure; |
105 |
}; |
109 |
}; |
106 |
} |
110 |
} |
107 |
} |
111 |
} |
108 |
- |
|
|