{"id":15514721,"url":"https://github.com/fgasper/p5-data-fdset","last_synced_at":"2025-10-12T11:36:49.497Z","repository":{"id":56839664,"uuid":"208050673","full_name":"FGasper/p5-Data-FDSet","owner":"FGasper","description":"CPAN’s Data::FDSet","archived":false,"fork":false,"pushed_at":"2019-09-13T21:20:24.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T19:21:38.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FGasper.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-12T12:53:01.000Z","updated_at":"2019-09-13T21:20:26.000Z","dependencies_parsed_at":"2022-08-29T05:00:44.668Z","dependency_job_id":null,"html_url":"https://github.com/FGasper/p5-Data-FDSet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FGasper/p5-Data-FDSet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Data-FDSet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Data-FDSet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Data-FDSet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Data-FDSet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FGasper","download_url":"https://codeload.github.com/FGasper/p5-Data-FDSet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Data-FDSet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011180,"owners_count":26084900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:00:25.430Z","updated_at":"2025-10-12T11:36:49.460Z","avatar_url":"https://github.com/FGasper.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nData::FDSet - Syntactic sugar for [select()](https://metacpan.org/pod/perlfunc#select) masks\n\n# SYNOPSIS\n\nObject-oriented syntax:\n\n    my $fdset = Data::FDSet-\u003enew();\n\n    # These accept either filehandles or file descriptors:\n    $fdset-\u003eadd( $some_filehandle, fileno($other_fh) );\n    $fdset-\u003eremove( $other_fh );\n\n    my $rout = Data::FDSet-\u003enew();\n\n    my $got = select( $$rout = $$fdset, undef, undef, 10 );\n\n    if ($got \u003e 1) {\n        my $fds_to_read_ar = $rout-\u003eget_fds();\n    }\n\nOr, if you’d rather avoid object-oriented syntax:\n\n    my $rout = q\u003c\u003e;\n    Data::FDSet::add(\\$rout, $some_filehandle, fileno($other_fh))\n\n    my $fds_to_read_ar = Data::FDSet::get_fds(\\$rout);\n\n# DESCRIPTION\n\nThis little module makes working with 4-argument [select()](https://metacpan.org/pod/perlfunc#select)\na bit easier by providing object methods to do the typical operations done\non the bitmasks in connection with that function. These methods parallel\nthe functions that C provides to handle `struct fd_set`.\n\n# INTERFACE NOTE\n\nA Data::FDSet object is a blessed scalar reference to a bitmask.\nUnlike with most Perl objects, you may safely reference the object\ninternals, e.g., by doing\n\n    $$rout_obj = $rin;\n\n… to replace the bitmask contents. (For this reason, this class defines\nno method to do the above.)\n\n# METHODS\n\n## $obj = _CLASS_-\u003enew( \\[ $BITMASK \\] );\n\nInstantiates this class. $BITMASK may optionally be passed to\ninitialize the object state.\n\n## $obj = _OBJ_-\u003eevacuate()\n\nEmpty out the object. Analogous to [FD\\_ZERO(2)](http://man.he.net/man2/FD_ZERO).\n\nReturns _OBJ_.\n\n## $obj = _OBJ_-\u003eadd( $FD\\_OR\\_FH \\[, $FD\\_OR\\_FH, .. \\] )\n\nAdd one or more file descriptors to the object.\nAccepts either Perl filehandles or file descriptors.\nAnalogous to [FD\\_SET(2)](http://man.he.net/man2/FD_SET).\n\n## $obj = _OBJ_-\u003eremove( $FD\\_OR\\_FH \\[, $FD\\_OR\\_FH, .. \\] )\n\nThe complement of `add()`.\nAnalogous to [FD\\_CLR(2)](http://man.he.net/man2/FD_CLR).\n\n## $yn = _OBJ_-\u003ehas( $FD\\_OR\\_FH )\n\nTests for a file descriptor’s presence in the object.\nAccepts either a Perl filehandles or a file descriptor.\nAnalogous to [FD\\_ISSET(2)](http://man.he.net/man2/FD_ISSET).\n\n## $fds\\_ar = _OBJ_-\u003eget\\_fds()\n\nReturns a reference to an array of the file descriptors that are\nin the object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-data-fdset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgasper%2Fp5-data-fdset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-data-fdset/lists"}