X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute%2FUser.pm;h=bcd98a00ed3e591c86a995ad3f8c8be1abebd794;hb=15abf289110563e5246d38a0621ad26c0bfd247d;hp=bc28dbef511053f809ce75171775d88a8e20feb9;hpb=2b58ccdf81685a1167a43c38705a0d84b9d8d661;p=spider.git diff --git a/perl/Route/User.pm b/perl/Route/User.pm index bc28dbef..bcd98a00 100644 --- a/perl/Route/User.pm +++ b/perl/Route/User.pm @@ -39,6 +39,7 @@ sub count sub max { + count(); return $max; } @@ -58,14 +59,21 @@ sub new return $self; } +sub get_all +{ + return values %list; +} + sub del { my $self = shift; my $pref = shift; - my $ref = $self->delparent($pref->{call}); - return () if @$ref; - my @out = delete $list{$self->{call}}; - return @out; + $self->delparent($pref); + unless (@{$self->{parent}}) { + delete $list{$self->{call}}; + return $self; + } + return undef; } sub get