2 # User routing routines
4 # Copyright (c) 2001 Dirk Koopman G1TLH
16 use vars qw(%list %valid @ISA $max $filterdef);
20 parent => '0,Parent Calls,parray',
23 $filterdef = $Route::filterdef;
29 my $n = scalar(keys %list);
30 $max = $n if $n > $max;
45 confess "already have $call in $pkg" if $list{$call};
47 my $self = $pkg->SUPER::new($call);
48 $self->{parent} = [ $ncall ];
49 $self->{flags} = $flags;
59 my $ref = $self->delparent($pref->{call});
61 my @out = delete $list{$self->{call}};
68 $call = shift if ref $call;
69 return $list{uc $call};
75 return $self->_addlist('parent', @_);
81 return $self->_dellist('parent', @_);
85 # generic AUTOLOAD for accessors
94 return if $name =~ /::DESTROY$/;
97 confess "Non-existant field '$AUTOLOAD'" unless $valid{$name} || $Route::valid{$name};
99 # this clever line of code creates a subroutine which takes over from autoload
100 # from OO Perl - Conway
101 # *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
102 @_ ? $self->{$name} = shift : $self->{$name} ;