develooper Front page | perl.perl5.porters | Postings from April 2003

Thread::Queue->new( parameters? )

Thread Next
From:
Elizabeth Mattijsen
Date:
April 17, 2003 07:51
Subject:
Thread::Queue->new( parameters? )
Message ID:
p05111b02bac46d532e37@[192.168.1.9]
Currently, Thread::Queue->new is documented as not accepting any parameters.

    FUNCTIONS AND METHODS
        new     The "new" function creates a new empty queue.


However, any parameters that you _do_ pass, are initialized as "the queue".

sub new {
     my $class = shift;
     my @q : shared = @_;
     return bless \@q, $class;
}

Allowing:

     $q = Thread::Queue->new    #legal
     $q = Thread::Queue->new( 1,2,3 )    # allowed, but legal?


So my question is: should the documentation be altered, or should the 
code of Thread::Queue be changed to disallow passing parameters?


Liz

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About