Line 201... |
Line 201... |
201 |
# Added code to put everything from config file except for moduleDirs, transports and scriptDirs into the report. This allows
|
201 |
# Added code to put everything from config file except for moduleDirs, transports and scriptDirs into the report. This allows
|
202 |
# users to arbitrarily choose to send additional information by simply adding it to the config file.
|
202 |
# users to arbitrarily choose to send additional information by simply adding it to the config file.
|
203 |
#
|
203 |
#
|
204 |
# Version 3.7.1 20240518 RWR
|
204 |
# Version 3.7.1 20240518 RWR
|
205 |
# Added code to ensure output is UTF-8
|
205 |
# Added code to ensure output is UTF-8
|
- |
|
206 |
#
|
- |
|
207 |
# Version 3.7.2 20240601 RWR
|
- |
|
208 |
# Added code to undefine &doit if it is already defined, ie if one transport fails and we want to try another one,
|
- |
|
209 |
# we were getting a "can not redefine doit" and the transports would fail. The line added is
|
- |
|
210 |
# undef &doit if exists &doit;
|
206 |
|
211 |
|
207 |
|
212 |
|
208 |
# find our location and use it for searching for libraries
|
213 |
# find our location and use it for searching for libraries
|
209 |
BEGIN {
|
214 |
BEGIN {
|
210 |
use FindBin;
|
215 |
use FindBin;
|
Line 220... |
Line 225... |
220 |
my $sourceDir = dirname( abs_path( __FILE__ ) );
|
225 |
my $sourceDir = dirname( abs_path( __FILE__ ) );
|
221 |
|
226 |
|
222 |
# define the version number
|
227 |
# define the version number
|
223 |
# see https://metacpan.org/pod/release/JPEACOCK/version-0.97/lib/version.pod
|
228 |
# see https://metacpan.org/pod/release/JPEACOCK/version-0.97/lib/version.pod
|
224 |
use version;
|
229 |
use version;
|
225 |
our $VERSION = version->declare("v3.7.1");
|
230 |
our $VERSION = version->declare("v3.7.2");
|
226 |
our $DATA_VERSION = version->declare( 'v3.7.0' ); # used in sending the data file. sets version of XML/YAML data file
|
231 |
our $DATA_VERSION = version->declare( 'v3.7.0' ); # used in sending the data file. sets version of XML/YAML data file
|
227 |
|
232 |
|
228 |
# see https://perldoc.perl.org/Getopt/Long.html
|
233 |
# see https://perldoc.perl.org/Getopt/Long.html
|
229 |
use Getopt::Long;
|
234 |
use Getopt::Long;
|
230 |
# allow -vvn (ie, --verbose --verbose --dryrun)
|
235 |
# allow -vvn (ie, --verbose --verbose --dryrun)
|
Line 293... |
Line 298... |
293 |
foreach my $key ( sort { $a <=> $b } %$transports ) {
|
298 |
foreach my $key ( sort { $a <=> $b } %$transports ) {
|
294 |
if ( $transports->{$key}->{'sendScript'} ) {
|
299 |
if ( $transports->{$key}->{'sendScript'} ) {
|
295 |
&logIt( 3, "Trying to find file " . $transports->{$key}->{'sendScript'} . " in " . join( "\n\t", @{$scriptDirectory} ) );
|
300 |
&logIt( 3, "Trying to find file " . $transports->{$key}->{'sendScript'} . " in " . join( "\n\t", @{$scriptDirectory} ) );
|
296 |
my $sendScript = &findFile( $transports->{$key}->{'sendScript'}, $scriptDirectory );
|
301 |
my $sendScript = &findFile( $transports->{$key}->{'sendScript'}, $scriptDirectory );
|
297 |
if ( $sendScript ) {
|
302 |
if ( $sendScript ) {
|
- |
|
303 |
# check if we have doit defined from previous iteration and, if so, undefine it
|
- |
|
304 |
undef &doit if exists &doit;
|
298 |
# load the chosen script into memory
|
305 |
# load the chosen script into memory
|
299 |
require $sendScript;
|
306 |
require $sendScript;
|
300 |
# merge the globals in
|
307 |
# merge the globals in
|
301 |
while ( my ( $gkey, $value ) = each %$globals ) {
|
308 |
while ( my ( $gkey, $value ) = each %$globals ) {
|
302 |
$transports->{$key}->{$gkey} = $value;
|
309 |
$transports->{$key}->{$gkey} = $value;
|