$listen is an option, an arg you can pass the new() method. It is supposed to be a listen socket.
From the book description of that API: "$set = IO::SessionSet->new([$listen])
Creates a new IO::SessionSet. If a listen socket is provided in $listen, then the module automatically accepts incoming connections"
Basically
$set = IO::SessionSet->new() ;
is the same as doing
$set = IO::SessionSet->new() ;
$set->add($listen);
Does that make sense to you? Good, then what he is doing is calling the
UNIVERSAL (as described above) to make sure that, if $listen exists, its a listening socket (although it can be other things too, see code on page 393 of the book) and if it is he calls his ->add method for you.
Update: Sorry, I misread the question and just got to it in a more roundabout way :)
"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.