Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Class::Tiny multiple inheritance?
package Blah;
use strict;
use warnings;
use Class::Tiny qw(blah);
sub bla {
my ($oh, @ah) = @_;
return join(' ', ucfirst($oh->blah), @ah);
}
1;
package Argh;
use strict;
use warnings;
use Class::Tiny qw(argh);
sub arg {
return uc($_[0]->argh);
}
1;
package Oh;
use strict;
use warnings;
use parent -norequire, 'Blah', 'Argh';
use Class::Tiny qw(oh);
1;
package main;
my $b = Oh->new(blah => 'blablabla', argh => 'aargh!', oh => 'ohh!');
print $b->bla('bla', 'blaaa!', $b->arg, $b->oh) . "\n";
print Oh->isa('Blah') . ' ' . Oh->isa('Argh') . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.