2 # User routing routines
4 # Copyright (c) 2001 Dirk Koopman G1TLH
16 use vars qw(%list %valid @ISA $max);
20 parent => '0,Parent Calls,parray',
29 $max = $n if $n > $max;
44 confess "already have $call in $pkg" if $list{$call};
46 my $self = $pkg->SUPER::new($call);
47 $self->{parent} = [ $ncall ];
48 $self->{flags} = $flags;
58 my $ref = $self->delparent($pref->{call});
60 delete $list{$self->{call}};
67 $call = shift if ref $call;
68 return $list{uc $call};
74 return $self->_addlist('parent', @_);
80 return $self->_dellist('parent', @_);
84 # generic AUTOLOAD for accessors
93 return if $name =~ /::DESTROY$/;
96 confess "Non-existant field '$AUTOLOAD'" unless $valid{$name} || $Route::valid{$name};
98 # this clever line of code creates a subroutine which takes over from autoload
99 # from OO Perl - Conway
100 # *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
101 @_ ? $self->{$name} = shift : $self->{$name} ;