--- loncom/types/Queue.pm 2003/04/18 06:10:47 1.2 +++ loncom/types/Queue.pm 2003/04/24 15:12:40 1.4 @@ -1,6 +1,6 @@ # Implement a simple queue in terms of a list. # -# $Id: Queue.pm,v 1.2 2003/04/18 06:10:47 albertel Exp $ +# $Id: Queue.pm,v 1.4 2003/04/24 15:12:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -86,6 +86,20 @@ sub dequeue { } +=pod + +=head1 Count + +Returns number of items in a queue. + +=cut + +sub Count { + my $self = shift; + my $count = scalar(@$self); + return $count; +} + 1; =pod