{"id":21408618,"url":"https://github.com/raku-community-modules/trait-io","last_synced_at":"2025-06-16T01:32:23.312Z","repository":{"id":137932034,"uuid":"89800814","full_name":"raku-community-modules/Trait-IO","owner":"raku-community-modules","description":"Helper IO traits","archived":false,"fork":false,"pushed_at":"2023-11-14T14:26:13.000Z","size":76,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T04:26:05.287Z","etag":null,"topics":["raku"],"latest_commit_sha":null,"homepage":"https://raku.land/zef:raku-community-modules/Trait::IO","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raku-community-modules.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-29T17:19:33.000Z","updated_at":"2024-11-30T19:34:55.000Z","dependencies_parsed_at":"2023-11-14T15:45:18.281Z","dependency_job_id":null,"html_url":"https://github.com/raku-community-modules/Trait-IO","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raku-community-modules%2FTrait-IO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raku-community-modules%2FTrait-IO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raku-community-modules%2FTrait-IO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raku-community-modules%2FTrait-IO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raku-community-modules","download_url":"https://codeload.github.com/raku-community-modules/Trait-IO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243905447,"owners_count":20366824,"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","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":["raku"],"created_at":"2024-11-22T17:17:29.362Z","updated_at":"2025-03-16T17:29:31.877Z","avatar_url":"https://github.com/raku-community-modules.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/raku-community-modules/Trait-IO/actions/workflows/test.yml/badge.svg)](https://github.com/raku-community-modules/Trait-IO/actions)\n\nNAME\n====\n\nTrait::IO - Helper IO traits\n\nSYNOPSIS\n========\n\n```raku\nuse Trait::IO;\n\nfor \u003ca b c\u003e {\n    my $fh does auto-close = .IO.open: :w;\n    # ... do things with the file handle\n    # $fh is auto-closed on block leave\n}\n\n# Top-level is OK too; will close on scope leave\nmy $fh does auto-close = \"foo\".IO.open: :w;\n# ...\n```\n\nDESCRIPTION\n===========\n\nUseful traits for working with Raku IO.\n\nEXPORTS\n=======\n\ndoes auto-close\n---------------\n\n```raku\nmy $fh does auto-close = \"foo\".IO.open: :w;\n```\n\nInstalls a `LEAVE` phaser to automatically close the file handle when scope is left.\n\nExports the \u003cauto-close\u003e constant and the `trait_mod:\u003cdoes\u003e` multi that accepts it as a value.\n\nCurrently works only with variables and not with attributes or parameters. Patches welcome.\n\nAUTHOR\n======\n\nZoffix Znet\n\nCOPYRIGHT AND LICENSE\n=====================\n\nCopyright 2017 - 2018 Zoffix Znet\n\nCopyright 2019 - 2022 Raku Community\n\nThis library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraku-community-modules%2Ftrait-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraku-community-modules%2Ftrait-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraku-community-modules%2Ftrait-io/lists"}