Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
->SUPER::hi relies on __PACKAGE__ ? (monkeypatching) Can't locate object method "hi" via package "main::SUPER"
So I was monkeypatching and I tried to SUPER::method and I got
$ perl @HUH::ISA=q{FOO}; @FOO::ISA=q{BAR}; sub BAR::hi{66} sub FOO::hi { shif +t()->SUPER::hi }; print HUH->hi; __END__ Can't locate object method "hi" via package "main::SUPER" at - line 1.
I guess it SUPER:: relies on __PACKAGE__
I didn't know that
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ->SUPER::hi relies on __PACKAGE__ ? (monkeypatching)
by Athanasius (Archbishop) on Jun 13, 2013 at 02:19 UTC | |
|
Re: ->SUPER::hi relies on __PACKAGE__ ? (monkeypatching) Can't locate object method "hi" via package "main::SUPER"
by tobyink (Canon) on Jun 13, 2013 at 06:54 UTC | |
|
Re: ->SUPER::hi relies on __PACKAGE__ ? (monkeypatching) Can't locate object method "hi" via package "main::SUPER"
by choroba (Cardinal) on Jun 13, 2013 at 07:41 UTC | |
by james2vegas (Chaplain) on Jun 13, 2013 at 08:50 UTC |