1 From e2dcf93685e6947540119fd5caff0e440857801c Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Thu, 11 Jun 2020 22:41:00 +0800
4 Subject: [PATCH] cpumap_functions.sh: fix perl experimental feature issue
6 An experimental feature added in Perl 5.14 allowed each, keys, push,
7 pop, shift, splice, unshift, and values to be called with a scalar
8 argument. This experiment is considered unsuccessful, and has been
9 removed in 5.23 and later releases. So don't use this feature to
11 localhost:~# platform_expanded_cpu_list
12 Experimental keys on scalar is now forbidden at -e line 13.
14 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
16 utilities/worker-utils/worker-utils/cpumap_functions.sh | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
19 diff --git a/utilities/worker-utils/worker-utils/cpumap_functions.sh b/utilities/worker-utils/worker-utils/cpumap_functions.sh
20 index ab961f4..ecbbb05 100644
21 --- a/utilities/worker-utils/worker-utils/cpumap_functions.sh
22 +++ b/utilities/worker-utils/worker-utils/cpumap_functions.sh
23 @@ -389,7 +389,7 @@ function topology_to_cpulist {
27 - @cores = sort { $a <=> $b } keys $T{$socket};
28 + @cores = sort { $a <=> $b } keys %{ $T{$socket} };
29 @sel_cores = splice @cores, $core_start, $num_cores;