Thread OOP: Vererbung & caller() (2 answers)
Opened by daywalka at 2006-10-18 00:13

esskar
 2006-10-18 00:26
#70879 #70879
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
das wäre sowieso schlechter stil
besser

Code: (dl )
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
26
27
28
29
package A;

sub new {
# ..
}

sub _init {
...
}

1;

package B;
use base qw/A/;

use NEXT;


sub new {
# ..
}

sub _init {
my $self = shift;
$self->NEXT::_init( @_ );
# ...
}

1;


oder noch besser, gleich CPAN:Class::C3 verwenden

View full thread OOP: Vererbung & caller()