ACDC and new version of Active Perl

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\ 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.

On perl help page 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 to look like this:

Code: Select all

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

Also, file 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
Use of uninitialized value $_[1] in read at c:\perl64\lib\IO\

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 2 guests