Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 51b3b122

Von Sven Schöling vor mehr als 1 Jahr hinzugefügt

  • ID 51b3b122d397c35cac2e493b17d4933358d8f555
  • Vorgänger 079fdfd9
  • Nachfolger 77b3a4c7

TypeDataProxy: _via

Unterschiede anzeigen:

SL/DB/Helper/TypeDataProxy.pm
package SL::DB::Helper::TypeDataProxy;
use strict;
use Scalar::Util qw(weaken);
sub new {
my ($class, $record_class, $type) = @_;
......
# convenience methods for common topics in type data
sub text {
my $self = shift;
$self->[1]->can("get3")->($self->[0], "text", @_);
_via("get3", [ "text" ], @_);
}
sub properties {
my $self = shift;
$self->[1]->can("get3")->($self->[0], "properties", @_);
_via("get3", [ "properties" ], @_);
}
sub show_menu {
my $self = shift;
$self->[1]->can("get3")->($self->[0], "show_menu", @_);
_via("get3", [ "show_menu" ], @_);
}
sub rights {
_via("get3", [ "rights" ], @_);
}
sub _via {
my $method = shift;
my $additional_args = shift;
my $self = shift;
$self->[1]->can("get3")->($self->[0], "rights", @_);
$self->[1]->can($method)->($self->[0], @$additional_args, @_);
}
sub AUTOLOAD {

Auch abrufbar als: Unified diff