| 1 | #!perl | ||
| 2 | |||
| 3 | use 5.10.0; | ||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | use FindBin; | ||
| 8 | use lib "$FindBin::Bin/lib"; | ||
| 9 | use lib "$FindBin::Bin/t/lib"; | ||
| 10 | |||
| 11 | |||
| 12 | # People class | ||
| 13 | # is Developer | ||
| 14 | # does 'MojoCoreMantainer' and 'PerlCoreMantainer' | ||
| 15 | package People { | ||
| 16 | use Mojo::Base 'Developer'; | ||
| 17 | |||
| 18 | # load roles | ||
| 19 | use Mojo::RoleTiny -with; | ||
| 20 | with 'MojoCoreMantainer'; | ||
| 21 | with 'PerlCoreMantainer'; | ||
| 22 | |||
| 23 | |||
| 24 | sub what_can_i_do { | ||
| 25 | my $self = shift; | ||
| 26 | say "I can do people things..."; | ||
| 27 | $self->make_code; | ||
| 28 | $self->mantaining_mojo; | ||
| 29 | $self->mantaining_perl; | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | my $p = People->new; | ||
| 34 | $p->what_can_i_do; | ||
| 35 | |||
| 36 |