Skip to content

Commit

Permalink
homedir: on v5.20, we can just use glob("~") for homedir
Browse files Browse the repository at this point in the history
even on MSWin32
  • Loading branch information
karenetheridge authored and rjbs committed Jun 7, 2020
1 parent d067638 commit f90e596
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
21 changes: 18 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions lib/Dist/Zilla/Plugin/MetaTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use namespace::autoclean;
This is an extension of L<Dist::Zilla::Plugin::InlineFiles>, 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<Test::CPAN::Meta> will be added as a C<develop requires> dependency (which
can be installed via C<< dzil listdeps --author | cpanm >>).
Expand All @@ -30,7 +30,7 @@ L<MetaConfig|Dist::Zilla::Plugin::MetaConfig>.
=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) = @_;
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/Dist/Zilla/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion t/plugins/misctests.t
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit f90e596

Please sign in to comment.