3 # Copyright PROCURA B.V. (c) 2008-2011 H.Merijn Brand
5 require 5.008; # <- also see postamble at the bottom for META.yml
8 use ExtUtils
::MakeMaker
;
12 DISTNAME
=> "Data-Peek",
13 ABSTRACT
=> "Extended/Modified debugging utilities",
14 AUTHOR
=> "H.Merijn Brand <h.merijn\@xs4all.nl>",
15 VERSION_FROM
=> "Peek.pm",
16 PREREQ_PM
=> { "DynaLoader" => 0,
20 "Test::NoWarnings" => 0,
22 clean
=> { FILES
=> join " ", qw(
32 $ExtUtils::MakeMaker
::VERSION
> 6.30 and $wm{LICENSE
} = "perl";
34 unless (exists $ENV{AUTOMATED_TESTING
} and $ENV{AUTOMATED_TESTING
} == 1) {
35 if (prompt
("Do you want to install module DP as a shortcut for Data::Peek ?", "y") =~ m/[yY]/) {
37 open my $pm, "<", "Peek.pm" or die "CAnnot read Peek.pm: $!\n";
38 my $vsn = do { <$pm> =~ m/^\$VERSION\s*=\s*"([0-9._]+)/m; $1 };
41 (my $dp = <DATA
>) =~ s/::VERSION::/"$vsn"/;
42 open my $fh, ">", "DP.pm" or die "Cannot open DP.pm: $!\n";
46 "Peek.pm" => '$(INST_LIB)/Data/Peek.pm',
47 "DP.pm" => '$(INST_LIB)/DP.pm',
49 $wm{clean
}{FILES
} .= " DP.pm";
53 $ENV{NO_SV_PEEK
} and $wm{DEFINE
} = "-DNO_SV_PEEK";
55 my $rv = WriteMakefile
(%wm);
63 my $valgrind = join " ", qw(
64 PERL_DESTRUCT_LEVEL=2 PERL_DL_NONLAZY=1
66 --suppressions=sandbox/perl.supp
68 --leak-resolution=high
72 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e"
73 "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"
74 $(TEST_FILES
) 3>valgrind
.log
77 my $min_vsn = ($] >= 5.010 && -d
"xt" && ($ENV{AUTOMATED_TESTING
} || 0) != 1)
80 ' -@env TEST_FILES="xt/*.t" make -e test_dynamic',
90 ' -@tail -5 valgrind.log',
93 q{ sandbox/leaktest $(FULLPERLRUN) "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)},
96 ' pod-spell-check --aspell --ispell',
98 'checkmeta: spellcheck',
99 ' perl sandbox/genMETA.pl -c',
102 ' perl sandbox/genMETA.pl',
104 'tgzdist: checkmeta fixmeta $(DISTVNAME).tar.gz distcheck',
105 ' -@mv -f $(DISTVNAME).tar.gz $(DISTVNAME).tgz',
106 ' -@cpants_lint.pl $(DISTVNAME).tgz',
107 ' -@rm -f Debian_CPANTS.txt',
115 BEGIN { *DP
:: = \
%Data::Peek
:: }
116 $VERSION = ::VERSION
::;
122 DP - Alias for Data::Peek
126 perl -MDP -wle'print DPeek for DDual ($?, 1)'
134 H.Merijn Brand <h.m.brand@xs4all.nl>
136 =head1 COPYRIGHT AND LICENSE
138 Copyright (C) 2008-2011 H.Merijn Brand
140 This library is free software; you can redistribute it and/or modify it
141 under the same terms as Perl itself.