Leser: 3
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
{ package A;
use Class::Struct;
struct A => { a => '$',};
sub geerbte(){
print "geerbte Methode\n"
}
}
{ package B;
our @ISA = qw(A);
use Class::Struct;
struct B => { a => 'A', b => '$',};
sub eigene(){
print "eigene Methode\n"
}
}
my $b = B->new();
$b->eigene();
$b->geerbte();
Quotestruct class cannot be a subclass (@ISA not allowed) at ClassStruct.pl line 16
7 Einträge, 1 Seite |