summaryrefslogtreecommitdiff
path: root/tools/HPMHookGen/HPMDataCheckGen.pl
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-11-15 17:22:42 +0100
committerHaru <haru@dotalux.com>2014-11-15 17:22:42 +0100
commit47565d423f40f4fbbbb032dcc6fa2f6670bfafab (patch)
treefe4430e284938c6a3f933a82f6b07f27cd93d0ae /tools/HPMHookGen/HPMDataCheckGen.pl
parenta6f077063eeff08ee27ae5170de1bb5cf4b2defb (diff)
downloadhercules-47565d423f40f4fbbbb032dcc6fa2f6670bfafab.tar.gz
hercules-47565d423f40f4fbbbb032dcc6fa2f6670bfafab.tar.bz2
hercules-47565d423f40f4fbbbb032dcc6fa2f6670bfafab.tar.xz
hercules-47565d423f40f4fbbbb032dcc6fa2f6670bfafab.zip
Follow-up to 61fc83fd7dd51e9a88ac7e6264692fcf561a37f7
Compatibility fix for older versions of Perl Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'tools/HPMHookGen/HPMDataCheckGen.pl')
-rw-r--r--tools/HPMHookGen/HPMDataCheckGen.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl
index 01728341d..06b58127a 100644
--- a/tools/HPMHookGen/HPMDataCheckGen.pl
+++ b/tools/HPMHookGen/HPMDataCheckGen.pl
@@ -21,7 +21,7 @@ my %out;
foreach my $file (@files) {
my $xml = new XML::Simple;
my $data = $xml->XMLin($file, ForceArray => 1);
- my $filekey = (keys $data->{compounddef})[0];
+ my $filekey = (keys %{ $data->{compounddef} })[0];
next unless $data->{compounddef}->{$filekey}->{includes}; # means its a struct from a .c file, plugins cant access those so we don't care.
next if $data->{compounddef}->{$filekey}->{compoundname}->[0] =~ /::/; # its a duplicate with a :: name e.g. struct script_state {<...>} ay;
my @filepath = split(/[\/\\]/, $data->{compounddef}->{$filekey}->{location}->[0]->{file});