Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$obj->SUPER::.... 2

Status
Not open for further replies.

Cagliostro

Programmer
Sep 13, 2000
4,226
GB
could you please help me,
there is a thing in the code I don't understant:
$obj->SUPER::....

What is that SUPER, and how can I find what exactly is it's implementation?

Ion Filipski
1c.bmp
 
thanks, so far is great, but how to get the name of the class what is targeted by SUPER?

Ion Filipski
1c.bmp
 
how may I get the name of the superclass?

Ion Filipski
1c.bmp
 
Look at the @ISA to see which classes are defined.

EXAMPLE:
Code:
@ISA = ( Module )

$self->SUPER::overridden_method(@_);

M. Brooks
 
stop!! If you need the name of the superclass then there's almost certainly something conceptually wrong with your design. It should always sound alarm bells when you see class names occurring explicitly;

If you use the name of the superclass, you are denying yourself the ability to later swap in another object with the same interface which flies in the face of the object paradigm.

What would you to do with it if you did get it?

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
fishiface, the great thing is what I don't make the design, and I'm not making any aplications. There is a hierarcy of classes what I don't know, but the application is big, and have several bugs what I have to fix.

Ion Filipski
1c.bmp
 
OK - good luck!

f

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
hey fishi how's it going, i'm thinking of picking up on that OO discussion we started.

Is it something you now have time for ?

regards,
1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top