Revision 43c3e3bc
Von Moritz Bunkus vor fast 7 Jahren hinzugefügt
SL/DB/Helper/Presenter.pm | ||
---|---|---|
17 | 17 |
|
18 | 18 |
return if $method eq 'DESTROY'; |
19 | 19 |
|
20 |
eval "require $self->[0]"; |
|
21 |
|
|
20 | 22 |
if (my $sub = $self->[0]->can($method)) { |
21 | 23 |
return $sub->($self->[1], @args); |
22 | 24 |
} |
23 | 25 |
} |
24 | 26 |
|
27 |
sub can { |
|
28 |
my ($self, $method) = @_; |
|
29 |
eval "require $self->[0]"; |
|
30 |
$self->[0]->can($method); |
|
31 |
} |
|
32 |
|
|
25 | 33 |
1; |
26 | 34 |
|
27 | 35 |
__END__ |
Auch abrufbar als: Unified diff
Presenter: can-Aufruf an geproxytes Objekt durchreichen & geproxyte Klasse laden