{"id":18779393,"url":"https://github.com/zostay/io-nestedcapture","last_synced_at":"2025-12-18T00:30:17.683Z","repository":{"id":66558016,"uuid":"2610783","full_name":"zostay/IO-NestedCapture","owner":"zostay","description":"Helper for piping I/O","archived":false,"fork":false,"pushed_at":"2011-10-20T03:04:39.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T10:29:11.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zostay.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-20T03:04:08.000Z","updated_at":"2014-09-08T23:34:36.000Z","dependencies_parsed_at":"2023-02-20T06:31:27.080Z","dependency_job_id":null,"html_url":"https://github.com/zostay/IO-NestedCapture","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/zostay%2FIO-NestedCapture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2FIO-NestedCapture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2FIO-NestedCapture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2FIO-NestedCapture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zostay","download_url":"https://codeload.github.com/zostay/IO-NestedCapture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690598,"owners_count":19681129,"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":[],"created_at":"2024-11-07T20:19:54.182Z","updated_at":"2025-12-18T00:30:17.619Z","avatar_url":"https://github.com/zostay.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"IO::NestedCapture\n=================\n\nIO::NestedCapture allows for some nice and simple STDIN, STDOUT, STDERR\ncapturing that can be nested. If you just need to capture output without the\nnesting, you might want to see IO::Capture.\n\nWhat do I mean by nested capture? Here's an example:\n\n  use IO::NestedCapture ':subroutines';\n  my $io = IO::String-\u003enew;\n\n  IO::NestedCapture-\u003eset_next_out($io);\n\n  capture_out \\\u0026foo;\n\n  while (\u003c$io\u003e) { print ucfirst($_) }\n\n  sub foo {\n    capture_out \\\u0026bar;\n\n    my $out = IO::NestedCapture-\u003eget_last_out;\n    while (\u003c$out\u003e) { print lc($_) }\n  }\n\n  sub bar {\n    print \"HELLO WORLD!\\n\";\n  }\n\n  # output is:\n  # Hello world!\n\nBasically, the output of the first method is captured and converted to lowercase\nand then the other capture captures it and converts the first character to\nuppercase.\n\nInstallation\n------------\n\nTypical Module::Build install:\n\n  perl Build.PL\n  ./Build\n  ./Build test\n  ./Build install\n\nBugs and Such\n-------------\n\nFeature requests and bugs can be submitted to CPAN RT:\n\n  http://rt.cpan.org/\n\nCheers,\nSterling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzostay%2Fio-nestedcapture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzostay%2Fio-nestedcapture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzostay%2Fio-nestedcapture/lists"}