The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

foundation - Inheritance without objects

SYNOPSIS

  package Foo;

  sub fooble { 42 }

  package Bar;

  sub mooble { 23 }

  package FooBar;
  use foundation qw(Foo Bar);

  print fooble();       # prints 42
  print moodle();       # prints 23

DESCRIPTION

Haven't drunk the OO Kool-Aid yet? Think object-oriented has something to do with Ayn Rand? Do you eat Java programmers for breakfast?

If the answer to any of those is yes, than this is the module for you! foundation adds the power of inheritance without getting into a class-war!

Simply use foundation and list which libraries symbols you wish to "inherit". It then sucks in all the symbols from those libraries into the current one.

BUGS

Plenty, I'm sure. This is a quick proof-of-concept knock off.

AUTHOR

Michael G Schwern <schwern@pobox.com>

SEE ALSO

Sex