in reply to Point me in the right direction with OO inheritance and static variables

One important thing to realize is that in Perl, only methods are inherited. In other languages it's different, but Perl has no notion of 'object attributes', strictly speaking. Any reference can be an object, including references to numbers and strings (and these things can't have user-defined attributes).
I'm not sure where to begin with inheritance though. I was hoping someone could point me in the right direction?
A package in Perl can have a magic array @ISA. This array can hold strings, which must be names of packages (class and package is the same thing). When you call a method on an object, like $some_object->some_method() Perl checks which class (package) this $some_object belongs to (you specified it with function bless). If that class doesn't have some_method, then Perl checks the @ISA array of the class. It takes the first string from this array, assumes it's a package name and then searches that package for some_method. If some_method is found, Perl calls some_method, with $some_object as the first argument. So, $some_object->some_method() is equivalent to SomeClass::some_method($some_object) (SomeClass comes from an @ISA array). And that is OOP in Perl.

Replies are listed 'Best First'.
Re^2: Point me in the right direction with OO inheritance and static variables
by choroba (Cardinal) on Sep 02, 2014 at 11:36 UTC
    and these things can't have user-defined attributes
    Unless inside out.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      BrowserUK came up with an inside-in storage technique using blessed references to strings.

      Tends to be a little slow for attribute access, but the objects take up very little memory, which is nice.

      a href=