- or download this
package X;
sub foo;
...
X->bar; # calls X::bar('X');
Y->foo; # calls Y::foo('Y');
Y->bar; # calls X::bar('Y');
- or download this
// yes, this is C++, so shoot me
class X {
...
class Y : public X {
virtual int foo () { return 3; }
};
- or download this
void printStuff (X& obj);
- or download this
package Employee;
sub new {
...
}
# and so on...
- or download this
use Employee;
# defines Employee, Employee::Boss,
...
$joe = Employee::Intern->new('Joe', 'Schmoe');
$jay = Employee::Boss->new('Jay','Schmay');
$not = Employee->new('Not', 'Happening'); # <-- dies