From f90e59684c9d367652874c1100badb3fdeb66bcb Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Fri, 12 May 2017 17:31:52 +0200 Subject: [PATCH] homedir: on v5.20, we can just use glob("~") for homedir even on MSWin32 --- Changes | 21 ++++++++++++++++++--- lib/Dist/Zilla/Plugin/MetaTests.pm | 6 +++--- lib/Dist/Zilla/Util.pm | 2 +- t/plugins/misctests.t | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index f6ca83176..2051824f0 100644 --- a/Changes +++ b/Changes @@ -1,12 +1,27 @@ Revision history for {{$dist->name}} {{$NEXT}} - - replace uses of File::HomeDir with a simple glob() + [THIS RELEASE MIGHT BREAK YOUR BUILD] + - now requires perl v5.20.0 + - the "plugins" and "plugins_with" methods, along with a few others, + now are meant to be called in list context rather than scalar; you + should update to calling in list context, as Dist::Zilla v8 will stop + returning references + + [LESS TERRIFYING CHANGES] + - Introducing Dist::Zilla::Dialect! This library turns on the features + being used by core Dist::Zilla code. Probably don't just use this + blindly in your code, but there it is. + - replace uses of File::HomeDir with a simple glob() (thanks, Karen + Etheridge) - Dist::Zilla::Tester no longer changes into the source directory when building. This may break some plugins that do not prepend - $zilla->root to paths when they should. + $zilla->root to paths when they should. (thanks, Karen Etheridge) - version strings must now pass version.pm's is_strict checks, which - eliminates such discouraged constructs as v1.23_01. + eliminates such discouraged constructs as v1.23_01 (thanks, Karen + Etheridge) + - the test generated by [MetaTests] is now an author test, not a + release test (thanks, Karen Etheridge) 6.015 2020-05-29 14:30:51-04:00 America/New_York - add docs for "dzil release -j" (thanks, Jonas B. Nielsen) diff --git a/lib/Dist/Zilla/Plugin/MetaTests.pm b/lib/Dist/Zilla/Plugin/MetaTests.pm index c23b80d96..e37fd188f 100644 --- a/lib/Dist/Zilla/Plugin/MetaTests.pm +++ b/lib/Dist/Zilla/Plugin/MetaTests.pm @@ -14,7 +14,7 @@ use namespace::autoclean; This is an extension of L, providing the following files: - xt/release/meta-yaml.t - a standard Test::CPAN::Meta test + xt/author/meta-yaml.t - a standard Test::CPAN::Meta test L will be added as a C dependency (which can be installed via C<< dzil listdeps --author | cpanm >>). @@ -30,7 +30,7 @@ L. =cut -# Register the release test prereq as a "develop requires" +# Register the author test prereq as a "develop requires" # so it will be listed in "dzil listdeps --author" sub register_prereqs { my ($self) = @_; @@ -47,7 +47,7 @@ __PACKAGE__->meta->make_immutable; 1; __DATA__ -___[ xt/release/distmeta.t ]___ +___[ xt/author/distmeta.t ]___ #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. diff --git a/lib/Dist/Zilla/Util.pm b/lib/Dist/Zilla/Util.pm index 57d7a71ae..55ece2a89 100644 --- a/lib/Dist/Zilla/Util.pm +++ b/lib/Dist/Zilla/Util.pm @@ -127,7 +127,7 @@ sub expand_config_package_name { } sub homedir { - $^O eq 'MSWin32' && "$]" < 5.016 ? $ENV{HOME} || $ENV{USERPROFILE} : (glob('~'))[0]; + (glob('~'))[0]; } sub _global_config_root { diff --git a/t/plugins/misctests.t b/t/plugins/misctests.t index 92b630b0a..ef25e496d 100644 --- a/t/plugins/misctests.t +++ b/t/plugins/misctests.t @@ -19,7 +19,7 @@ my $tzil = Builder->from_config( $tzil->build; -my $meta_test = $tzil->slurp_file('build/xt/release/distmeta.t'); +my $meta_test = $tzil->slurp_file('build/xt/author/distmeta.t'); like($meta_test, qr{meta_yaml_ok}, "we have a distmeta file that tests it"); my $pod_test = $tzil->slurp_file('build/xt/author/pod-syntax.t');