Add all the A tasks
This commit is contained in:
parent
2dd7375f96
commit
051504d65b
1608 changed files with 18584 additions and 0 deletions
14
Task/Abstract-type/Perl/abstract-type-1.pl
Normal file
14
Task/Abstract-type/Perl/abstract-type-1.pl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package AbstractFoo;
|
||||
|
||||
use strict;
|
||||
|
||||
sub frob { die "abstract" }
|
||||
sub baz { die "abstract" }
|
||||
|
||||
sub frob_the_baz {
|
||||
my $self = shift;
|
||||
$self->frob($self->baz());
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
13
Task/Abstract-type/Perl/abstract-type-2.pl
Normal file
13
Task/Abstract-type/Perl/abstract-type-2.pl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package AbstractFoo;
|
||||
|
||||
use strict;
|
||||
|
||||
sub frob { ... }
|
||||
sub baz { ... }
|
||||
|
||||
sub frob_the_baz {
|
||||
my $self = shift;
|
||||
$self->frob($self->baz());
|
||||
}
|
||||
|
||||
1;
|
||||
12
Task/Abstract-type/Perl/abstract-type-3.pl
Normal file
12
Task/Abstract-type/Perl/abstract-type-3.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package AbstractFoo;
|
||||
|
||||
use Moose::Role;
|
||||
|
||||
requires qw/frob baz/;
|
||||
|
||||
sub frob_the_baz {
|
||||
my $self = shift;
|
||||
$self->frob($self->baz());
|
||||
}
|
||||
|
||||
1;
|
||||
12
Task/Abstract-type/Perl/abstract-type-4.pl
Normal file
12
Task/Abstract-type/Perl/abstract-type-4.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package AbstractFoo;
|
||||
|
||||
use Role::Tiny;
|
||||
|
||||
requires qw/frob baz/;
|
||||
|
||||
sub frob_the_baz {
|
||||
my $self = shift;
|
||||
$self->frob($self->baz());
|
||||
}
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue