in reply to Re: Error with CPAN module XML-BMEcat
in thread Error with CPAN module XML-BMEcat

Thank you very much for your feedback Rob. As many other starting to post here I do not feel very experienced and questioning modules listed at CPAN feels wrong but it looks to me that the code should be more like:
sub creatCatalogGroup { my ($self, $key) = @_; # pls.don't forget this problem (exists @{$self}[0]->{$key}) ? return @{$self}[0]->{$key} : return Push2PsH($self, $key, CatalogGroup->new()); }

I am not yet sure if it does the right thing, but at least it does not throw an error.

Cheers

Niko

Replies are listed 'Best First'.
Re^3: Error with CPAN module XML-BMEcat
by Anonymous Monk on Aug 11, 2017 at 00:17 UTC

    Hi

    Oh wow, thats the authors comment,

    I see the test file is named "Test.pl" most of the cpan-testers didn't run the test file

    I've made fixes, but I've not examined the xml file to check if it makes sense, but the test.pl now runs without problems

    Here is a new version of that distribution, use patch to create it, use patch -p0 -i XML-BMEcat-0.56.patch and get

    patching file XML-BMEcat-0.56/Changes
    patching file XML-BMEcat-0.56/lib/XML/BMEcat.pm
    patching file XML-BMEcat-0.56/Makefile.PL
    patching file XML-BMEcat-0.56/MANIFEST
    patching file XML-BMEcat-0.56/META.json
    patching file XML-BMEcat-0.56/META.yml
    patching file XML-BMEcat-0.56/test.pl
      Thank you very much to all of you especially for trying to update the script.

      the fix is to inherit from Class::PseudoHash

      seems to work perfect.
      I would not have expected that my problems were based in the module and I did not yet know about pseudo-hashes, so also thanks to runrig.
      I am happy with the updates and I have no more errors, works like a charm!

      Bah, forgot about pseudohash stuff I commented out in sub writeGroupSystem , so my patch is meh