ACDC and new version of Active Perl

kcs123
Scavenger
Posts: 10
Joined: 11 Oct 2015, 12:41

ACDC and new version of Active Perl

Postby kcs123 » 07 Mar 2017, 16:50

ACDC perl library and scripts were created long time ago with older version of Perl. Those older Perl versions are no longer available to download, at least not for free. If you try to run ACDC with latest version of perl you get error of this kind:
Can't use 'defined(@_)' (Maybe you should just omit the defined()?) at stkutils\data_packet.pm line #32


I was doing some research and it seems that usage of "defined" command in a way how it is used in provided sctipts is deprecated.
http://www.perlmonks.org/?node=1077762

On perl help page http://perldoc.perl.org/functions/defined.html seems that instead of "define" is now enough to just use "if (@_myarray) " expression. Perl should know somehow if it is defined array and if it have some values in it.

Fortunately, fix for this issue is simple enough. You need to change line #32 in file data_packet.pm to look like this:

Code: Select all

#die if !(defined(@_));
die if !((@_)); ## KCS


Also, file ini_file.pm at line #196 need changes too:

Code: Select all

##next if defined(@{$p->{default}}) && @{$container->{$p->{name}}} == @{$p->{default}};
next if (@{$p->{default}}) && @{$container->{$p->{name}}} == @{$p->{default}};


After that ACDC works properly again. I was having warning message though, from Perl library handle.pm:
Use of uninitialized value $_[1] in read at c:\perl64\lib\IO\handle.pm

But that one was not causing any harm. I was packed existing files and created new all.spawn file then compared it with older one.
Files are matched, so I can assume that it works properly.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest