perl/classes/inheritance question...

From: jseely13 (jseely13_at_charter.net)
Date: 09/15/04

  • Next message: Simon Callan: "Re: CGI and multipart/related data"
    Date: 15 Sep 2004 14:32:54 -0700
    
    

    in c++ when you create a superclass and subclass, there is some way
    you can define the superclass such that it has an empty/undefined
    method. any children of this class are required to both have and
    define this method. i wish i could remember what this is called...

    for ex:

    parent-class:
    sub do_something() {
    }

    child-class 1:
    sub do_something(){
      x++;
    }

    child-class 2:
    sub do_something(){
      x--;
    }

    anyway, is there a comparable thing in perl? it would be useful
    atm...

    TIA,

    -- john


  • Next message: Simon Callan: "Re: CGI and multipart/related data"

    Relevant Pages

    • Re: Help with design please
      ... entities from the problem space that are cohesive. ... disconnects in how the solution is viewed by different team members. ... >>relationships with the arrow on the superclass end. ... >>relationship the union of subclass members must be a complete set of the ...
      (comp.object)
    • Re: Some questions about inheritance
      ... This form of inheritance could be called "convenience inheritance". ... The subclass "is not a" superclass, but can use some of its implementation. ... Delegation is a technique for managing complexity by subdividing a class abstraction into multiple class abstractions that are related through associations of some sort. ...
      (comp.object)
    • Re: overloaded methods
      ... on the compile time declaration of types in the invocation. ... to different types, such as an int to a double, or a int to an Integer. ... Class Subclass extends Superclass ...
      (comp.lang.java.programmer)
    • Re: Help with design please
      ... Roles enhance the understanding of a Class Diagram enormously, ... I assume the arrows with solid arrows and no multiplicity are subclass ... relationships with the arrow on the superclass end. ... all of the crucial problem space abstraction is done. ...
      (comp.object)
    • Re: highly restrictive sub-classing
      ... possible to implement that subset in a more memory efficient way. ... I want to "subclass" the memory hungry module. ... Other options would be to *not* put the superclass in @ISA, ... It takes the approach of not using CGI at all. ...
      (comp.lang.perl.misc)