in reply to Re: Re: Prototype Failing?
in thread Prototype Failing?
The first argument in @_ in a method call is self.
When you call _self(@_) you are passing a reference to an array, the first element of which is a bless'd reference. (in this case a hashref).
When you give the array ref to Dumper, it duly dumps contents of the hash followed by the individual elements of the rest of @_. Ie. the list you passed to selftest().
When you try to dereference the first element of @_ as an array ref in ref($_[0]->[0]), it complains because $_[0] is a hashref (self) as magically supplied to selftest() when you invoked it as a method.
Hope that makes sense of it.
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Prototype Failing?
by John M. Dlugosz (Monsignor) on Jan 27, 2003 at 07:00 UTC | |
by BrowserUk (Patriarch) on Jan 27, 2003 at 07:48 UTC | |
by Flame (Deacon) on Jan 27, 2003 at 22:08 UTC | |
|
Re: Re: Re: Re: Prototype Failing?
by Flame (Deacon) on Jan 27, 2003 at 05:08 UTC |