RotherOSS / ITSMConfigurationManagement

This package implements all ITSM configuration management features. This package requires the ITSMCore package.
GNU General Public License v3.0
0 stars 1 forks source link

Loop over hash #5

Closed bschmalhofer closed 2 months ago

bschmalhofer commented 7 months ago

In Kernel/GenericInterface/Operation/ConfigItem/ConfigItemSearch.pm there is some fishy code:

                    # assamble the final value from the parts
                    for my $NewKey ( %{$NewXMLDataPart} ) {
                        for my $Item ( @{ $NewXMLDataPart->{$NewKey} } ) {
                            push @{ $NewXMLData->{$NewKey} }, $Item;
                        }
                    }

The loop is over keys and values of %{$NewXMLDataPart} but should propably be only over the keys. This was found with the helpl of Perl::Critic::Policy::Variables::ProhibitLoopOnHash.

stefanhaerter commented 2 months ago

I suggest to close this issue. The code in question was removed with a rework of the module.

bschmalhofer commented 2 months ago

Closing this issue, see the comment of @stefanhaerter .