6 use Getopt
::Long
qw(:config bundling nopermute);
11 "v|verbose:1" => \
$opt_v,
12 ) or die "usage: $0 [--check]\n";
18 open my $pm, "<", "Peek.pm" or die "Cannot read Peek.pm";
20 m/^.VERSION\s*=\s*"?([-0-9._]+)"?\s*;\s*$/ or next;
33 print STDERR
"Check required and recommended module versions ...\n";
34 BEGIN { $V::NO_EXIT
= $V::NO_EXIT
= 1 } require V
;
35 my %vsn = map { m/^\s*([\w:]+):\s+([0-9.]+)$/ ?
($1, $2) : () } @yml;
36 delete @vsn{qw( perl version )};
37 for (sort keys %vsn) {
38 $vsn{$_} eq "0" and next;
39 my $v = V
::get_version
($_);
40 $v eq $vsn{$_} and next;
41 printf STDERR
"%-35s %-6s => %s\n", $_, $vsn{$_}, $v;
44 print STDERR
"Checking generated YAML ...\n";
45 use Test
::YAML
::Meta
::Version
;
47 my $yml = join "", @yml;
48 eval { $h = Load
($yml) };
50 $opt_v and print Dump
$h;
51 my $t = Test
::YAML
::Meta
::Version
->new (yaml
=> $h);
53 die join "\n", "Test::YAML::Meta reported failure:", $t->errors, "";
55 use Parse
::CPAN
::Meta
;
56 eval { Parse
::CPAN
::Meta
::Load
($yml) };
59 my $req_vsn = $h->{requires
}{perl
};
60 print "Checking if $req_vsn is still OK as minimal version for examples\n";
61 use Test
::MinimumVersion
;
62 # All other minimum version checks done in xt
63 all_minimum_version_ok
($req_vsn, { paths
=> [ "examples" ]});
69 my @my = glob <*/META
.yml
>;
71 @my == 1 && open my $my, ">", $yf or die "Cannot update $yf\n";
76 my $jsn = Load
("@yml");
77 $jsn->{"meta-spec"} = {
79 url
=> "https://metacpan.org/module/CPAN::Meta::Spec?#meta-spec",
81 open $my, ">", $yf or die "Cannot update $yf\n";
82 print $my JSON
->new->utf8 (1)->pretty (1)->encode ($jsn);
84 chmod 0644, glob "*/META.*";
91 abstract
: Modified
and extended debugging facilities
94 - H
.Merijn Brand
<h
.m
.brand
@xs4all.nl
>
96 distribution_type
: module
110 ExtUtils
::MakeMaker
: 0
118 license
: http
://dev
.perl
.org
/licenses/
119 repository
: http
://repo
.or.cz
/w/Data
-Peek
.git
122 url
: http
://module
-build
.sourceforge
.net
/META
-spec
-v1
.4
.html