Re: "Hash as object attribute"-Problem with "use strict"

2004-07-08 Thread Luis
Oh no, what a simple mistake. :) I thank you so much! Best regards Luis Jeff 'Japhy' Pinyan schrieb: On Jul 7, Luis said: "Can't use string ("1") as a HASH ref while "strict refs" in use at TestObject.pm line 21." sub insertFriends { my $self = @_; The problem is that $self is not what y

Re: "Hash as object attribute"-Problem with "use strict"

2004-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, Luis said: >"Can't use string ("1") as a HASH ref while "strict refs" in use at >TestObject.pm line 21." > sub insertFriends { > my $self = @_; The problem is that $self is not what you think it is. You have stored the number of elements in @_ into $self. You meant my ($sel

Re: "Hash as object attribute"-Problem with "use strict"

2004-07-07 Thread Luis
Oh, I forgot to write down the line numbers. Line 21 is $self->{friends}->{'Juergen'} = "Sonja"; in the "TestObject.pm". So it's the first access to the hash-array. I'm searching the problem since some days. So I would be happy if anyone could explain the problem with the hash. Thanks in advan

"Hash as object attribute"-Problem with "use strict"

2004-07-07 Thread Luis
Hi, I have a problem. The following code results a "Can't use string ("1") as a HASH ref while "strict refs" in use at TestObject.pm line 21." Error if I include the "use strict" command. I don't understand why this error occures. Any suggestions?? First the object (TestObject.pm): ###