The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
class Foo {
 public:
   Foo() { 
 	secret=0; 
   }

   ~Foo() { }

   int get_secret() { return secret; }
   void set_secret(int s) {
        Inline_Stack_Vars;
        secret = s; 
   }

 protected:
   int secret;
};

class Bar : public Foo {
 public:
   Bar(int s) { secret = s; }
   ~Bar() {  }

   void set_secret(int s) { secret = s * 2; }
};