{"id":20315246,"url":"https://github.com/sysread/dist-zilla-plugin-xsversion","last_synced_at":"2026-05-08T21:31:05.072Z","repository":{"id":56836024,"uuid":"139185747","full_name":"sysread/Dist-Zilla-Plugin-XSVersion","owner":"sysread","description":"Adds XS_VERSION and munges XSLoader::load for perl XS modules using Dist::Zilla","archived":false,"fork":false,"pushed_at":"2018-06-29T19:40:14.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T05:58:44.537Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysread.png","metadata":{"files":{"readme":"README.pod","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":"2018-06-29T19:02:53.000Z","updated_at":"2018-06-29T19:40:11.000Z","dependencies_parsed_at":"2022-09-09T18:00:49.334Z","dependency_job_id":null,"html_url":"https://github.com/sysread/Dist-Zilla-Plugin-XSVersion","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/sysread%2FDist-Zilla-Plugin-XSVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FDist-Zilla-Plugin-XSVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FDist-Zilla-Plugin-XSVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FDist-Zilla-Plugin-XSVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysread","download_url":"https://codeload.github.com/sysread/Dist-Zilla-Plugin-XSVersion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818872,"owners_count":20025210,"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-14T18:18:30.794Z","updated_at":"2025-12-01T00:04:02.209Z","avatar_url":"https://github.com/sysread.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=pod\n\n=encoding UTF-8\n\n=head1 NAME\n\nDist::Zilla::Plugin::XSVersion - a thing\n\n=head1 VERSION\n\nversion 0.01\n\n=head1 SYNOPSIS\n\n  # dist.ini\n  [XSVersion]\n\n  # MyModule.pm\n  package MyModule;\n\n  require XSLoader;\n  XSLoader::load('MyModule');\n\n=head1 DESCRIPTION\n\nA hackey, quick plugin to implement the commonly used $XS_VERSION pattern\nrequired in order to support XS-loading of trial releases. This is not\npossible using L\u003cDist::Zilla::Plugin::PkgVersion\u003e, which will generate\nsomething like:\n\n  $MyModule::VERSION = '0.123_1'; # first line for CPAN indexer\n  $MyModule::VERSION = '0.1231';  # next line for internal versioning\n\nWithout an explicit second argument, L\u003cXSLoader/load\u003e will attempt to load the\ncompiled module using a C\u003cVERSIONCHECK\u003e against the value of\nC\u003c$MyModule::VERSION\u003e, which no longer matches C\u003c0.123_1\u003e after being\noverwritten.\n\n  $MyModule::VERSION = '0.123_1'; # first line for CPAN indexer\n  $MyModule::VERSION = '0.1231';  # next line for internal versioning\n  XSLoader::load('MyModule');     # gets the wrong $VERSION\n\nThis plugin rewrites the code above to something like:\n\n  $MyModule::XS_VERSION = $MyModule::VERSION = '0.123_1';\n  $MyModule::VERSION = '0.1231';\n  XSLoader::load('MyModule', $MyModule::XS_VERSION);\n\n=head1 CAVEATS\n\nI have no patience for PPI, so instead I fudged it with a couple of quick\nregexes. So long as you are using C\u003cPkgVersion\u003e to add $VERSION and do not do\nanything fancy on your C\u003cXSLoader::load\u003e line (such as load the result of\nevaluating an expression), everything should work. If not... well,\nI\u003cpatches welcome\u003e.\n\n=head1 AUTHOR\n\nJeff Ober \u003csysread@fastmail.fm\u003e\n\n=head1 COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2018 by Jeff Ober.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\n=cut\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fdist-zilla-plugin-xsversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysread%2Fdist-zilla-plugin-xsversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fdist-zilla-plugin-xsversion/lists"}