{"id":29903916,"url":"https://github.com/nigelhorne/test-returns","last_synced_at":"2025-08-01T17:13:54.323Z","repository":{"id":306984095,"uuid":"1027943916","full_name":"nigelhorne/Test-Returns","owner":"nigelhorne","description":"Verify that a method's output agrees with its specification","archived":false,"fork":false,"pushed_at":"2025-07-28T20:28:02.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T21:15:35.071Z","etag":null,"topics":["cpan","cpan-module","perl","perl5","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.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,"zenodo":null}},"created_at":"2025-07-28T19:15:29.000Z","updated_at":"2025-07-28T20:28:06.000Z","dependencies_parsed_at":"2025-07-28T21:15:37.422Z","dependency_job_id":"480dcbce-3df7-4c2e-9374-4234f1a61daf","html_url":"https://github.com/nigelhorne/Test-Returns","commit_stats":null,"previous_names":["nigelhorne/test-returns"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nigelhorne/Test-Returns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FTest-Returns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FTest-Returns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FTest-Returns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FTest-Returns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/Test-Returns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FTest-Returns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268265873,"owners_count":24222533,"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-08-01T02:00:08.611Z","response_time":67,"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":["cpan","cpan-module","perl","perl5","test-automation"],"created_at":"2025-08-01T17:13:49.100Z","updated_at":"2025-08-01T17:13:54.300Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nTest::Returns - Verify that a method's output agrees with its specification\n\n# SYNOPSIS\n\n    use Test::More;\n    use Test::Returns;\n\n    returns_ok(42, { type =\u003e 'integer' }, 'Returns valid integer');\n    returns_ok([], { type =\u003e 'arrayref' }, 'Returns valid arrayref');\n    returns_not_ok(\"bad\", { type =\u003e 'arrayref' }, 'Fails (expected arrayref)');\n\n# DESCRIPTION\n\nExports the function `returns_ok`, which asserts that a value satisfies a schema as defined in [Params::Validate::Strict](https://metacpan.org/pod/Params%3A%3AValidate%3A%3AStrict).\nIntegrates with [Test::Builder](https://metacpan.org/pod/Test%3A%3ABuilder) for use alongside [Test::Most](https://metacpan.org/pod/Test%3A%3AMost) and friends.\n\n# METHODS\n\n## returns\\_is($value, $schema, $test\\_name)\n\nPasses if `$value` satisfies `$schema` using `Return::Set`.\nFails otherwise.\n\n## returns\\_isnt\n\nOpposite of returns\\_is\n\n## returns\\_ok($value, $schema, $test\\_name)\n\nAlias for `returns_is`.\nProvided for naming symmetry and clarity.\n\n## returns\\_not\\_ok\n\nSynonym of returns\\_isnt\n\n# AUTHOR\n\nNigel Horne \u0026lt;njh at nigelhorne.com\u003e\n\n# SEE ALSO\n\n[Test::Builder](https://metacpan.org/pod/Test%3A%3ABuilder), [Returns::Set](https://metacpan.org/pod/Returns%3A%3ASet), [Params::Validate::Strict](https://metacpan.org/pod/Params%3A%3AValidate%3A%3AStrict)\n\n# SUPPORT\n\nThis module is provided as-is without any warranty.\n\n# LICENCE AND COPYRIGHT\n\nCopyright 2025 Nigel Horne.\n\nUsage is subject to licence terms.\n\nThe licence terms of this software are as follows:\n\n- Personal single user, single computer use: GPL2\n- All other users (including Commercial, Charity, Educational, Government)\n  must apply in writing for a licence for use from Nigel Horne at the\n  above e-mail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Ftest-returns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Ftest-returns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Ftest-returns/lists"}