Hallo Philipp,
no strict 'refs';
if (wantarray()) {
$meth_invoc = "@tmp = $self->SUPER::$method( @params );";
@tmp = &{"SUPER::$method"}(@params);
} else {
$meth_invoc = "$tmp = $self->SUPER::$method( @params );";
$tmp = &{"SUPER::$method")(@params);
}
eval $meth_invoc; # giving up and passing to XML::DOM-Interface
die $@ if ($@);
return $tmp unless (wantarray());
return @tmp if (wantarray());
return wantarray ? @tmp : $tmp;
So muesste es klappen.
Gruesse,
CK