derion has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use the XML-BMEcat Module and I presume that there is a problem with something outdated but I am absolutely stuck. There are some subroutines with similar problems, e.g.:
sub creatCatalogGroup { my ($self, $key) = @_; # pls.don't forget this problem (exists $self->{$key}) ? return $self->{$key} : return Push2PsH($self, $key, CatalogGroup->new()); }
Calling it with:
my $CatalogGroup = $GroupSystem->creatCatalogGroup('02');
Throws an error and the script stops:
Not a HASH reference at /cpan/XML/BMEcat.pm line 637.
which is (exists $self->{$key}) ? return $self->{$key} :
Data::Dumper gives me$VAR1 = bless( {} , 'GroupSystem' ); $VAR2 = '02';for @_
Now I cannot stop thinking that it must be about exists defined but that seems not logical to me. I tried it on perl 5.10.1 and 5.20.2 which are the versions I have available on webservers.
As far as I read everywhere exists is not deprecated but defined is that makes me think I am on the wrong track thinking about this part of the subroutine.
I would appreciate any hint into the right direction.
Cheers Niko
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error with CPAN module XML-BMEcat
by syphilis (Archbishop) on Aug 10, 2017 at 12:24 UTC | |
by derion (Sexton) on Aug 10, 2017 at 15:21 UTC | |
by Anonymous Monk on Aug 11, 2017 at 00:17 UTC | |
by derion (Sexton) on Aug 11, 2017 at 12:05 UTC | |
by Anonymous Monk on Aug 11, 2017 at 01:19 UTC | |
|
Re: Error with CPAN module XML-BMEcat
by runrig (Abbot) on Aug 10, 2017 at 15:51 UTC | |
|
Re: Error with CPAN module XML-BMEcat ( Not a HASH reference , Class::PseudoHash )
by Anonymous Monk on Aug 11, 2017 at 01:43 UTC | |
by derion (Sexton) on Aug 11, 2017 at 12:26 UTC | |
|
Re: Error with CPAN module XML-BMEcat
by Anonymous Monk on Aug 10, 2017 at 11:30 UTC | |
by derion (Sexton) on Aug 10, 2017 at 12:04 UTC |