projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
842a2e4
)
Presenter: can-Aufruf an geproxytes Objekt durchreichen & geproxyte Klasse laden
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 20 Dec 2017 14:29:27 +0000
(15:29 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 20 Dec 2017 14:31:50 +0000
(15:31 +0100)
SL/DB/Helper/Presenter.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Helper/Presenter.pm
b/SL/DB/Helper/Presenter.pm
index
9c9f8a2
..
0a33902
100644
(file)
--- a/
SL/DB/Helper/Presenter.pm
+++ b/
SL/DB/Helper/Presenter.pm
@@
-17,11
+17,19
@@
sub AUTOLOAD {
return if $method eq 'DESTROY';
+ eval "require $self->[0]";
+
if (my $sub = $self->[0]->can($method)) {
return $sub->($self->[1], @args);
}
}
+sub can {
+ my ($self, $method) = @_;
+ eval "require $self->[0]";
+ $self->[0]->can($method);
+}
+
1;
__END__