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:
ee62bda
)
Presenter-Template-Plugin: bei nicht existierenden Funktionen warnen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 11 Mar 2013 10:21:02 +0000
(11:21 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 11 Mar 2013 11:57:03 +0000
(12:57 +0100)
SL/Template/Plugin/P.pm
patch
|
blob
|
history
diff --git
a/SL/Template/Plugin/P.pm
b/SL/Template/Plugin/P.pm
index
d2f4423
..
44eeb43
100644
(file)
--- a/
SL/Template/Plugin/P.pm
+++ b/
SL/Template/Plugin/P.pm
@@
-29,7
+29,12
@@
sub AUTOLOAD {
my $method = $AUTOLOAD;
$method =~ s/.*:://;
- return '' unless $presenter->can($method);
+ return '' if $method eq 'DESTROY';
+
+ if (!$presenter->can($method)) {
+ $::lxdebug->message(LXDebug::WARN(), "SL::Presenter has no method named '$method'!");
+ return '';
+ }
splice @args, -1, 1, %{ $args[-1] } if @args && (ref($args[-1]) eq 'HASH');