3 # Copyright PROCURA B.V. (c) 2008-2009 H.Merijn Brand
5 require 5.006; # <- also see postamble at the bottom for META.yml
8 use ExtUtils
::MakeMaker
;
12 ABSTRACT
=> "Extended/Modified debugging utilities",
13 AUTHOR
=> "H.Merijn Brand <h.merijn\@xs4all.nl>",
14 VERSION_FROM
=> "Peek.pm",
15 PREREQ_PM
=> { "DynaLoader" => 0,
19 "Test::NoWarnings" => 0,
21 clean
=> { FILES
=> join " ", qw(
31 $ExtUtils::MakeMaker
::VERSION
> 6.30 and $wm{LICENSE
} = "perl";
33 unless (exists $ENV{AUTOMATED_TESTING
} and $ENV{AUTOMATED_TESTING
} == 1) {
34 if (prompt
("Do you want to install module DP as a shortcut for Data::Peek ?", "y") =~ m/[yY]/) {
36 open my $pm, "<", "Peek.pm" or die "CAnnot read Peek.pm: $!\n";
37 my $vsn = do { <$pm> =~ m/^\$VERSION\s*=\s*"([0-9._]+)/m; $1 };
40 (my $dp = <DATA
>) =~ s/::VERSION::/"$vsn"/;
41 open my $fh, ">", "DP.pm" or die "Cannot open DP.pm: $!\n";
45 "Peek.pm" => '$(INST_LIB)/Data/Peek.pm',
46 "DP.pm" => '$(INST_LIB)/DP.pm',
48 $wm{clean
}{FILES
} .= " DP.pm";
52 $ENV{NO_SV_PEEK
} and $wm{DEFINE
} = "-DNO_SV_PEEK";
54 my $rv = WriteMakefile
(%wm);
62 my $valgrind = join " ", qw(
63 PERL_DESTRUCT_LEVEL=2 PERL_DL_NONLAZY=1
65 --suppressions=sandbox/perl.supp
67 --leak-resolution=high
71 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e"
72 "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"
73 $(TEST_FILES
) 3>valgrind
.log
76 my $min_vsn = ($] >= 5.010 && -d
"xt" && ($ENV{AUTOMATED_TESTING
} || 0) != 1)
79 ' -@env TEST_FILES="xt/*.t" make -e test_dynamic',
89 ' -@tail -5 valgrind.log',
92 q{ sandbox/leaktest $(FULLPERLRUN) "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)},
95 ' perl sandbox/genMETA.pl -c',
98 ' perl sandbox/genMETA.pl',
100 'tgzdist: checkmeta fixmeta $(DISTVNAME).tar.gz distcheck',
101 ' -@mv -f $(DISTVNAME).tar.gz $(DISTVNAME).tgz',
102 ' -@cpants_lint.pl $(DISTVNAME).tgz',
103 ' -@rm -f Debian_CPANTS.txt',
111 BEGIN { *DP
:: = \
%Data::Peek
:: }
112 $VERSION = ::VERSION
::;
118 DP - Alias for Data::Peek
122 perl -MDP -wle'print DPeek for DDual ($?, 1)'
130 H.Merijn Brand <h.m.brand@xs4all.nl>
132 =head1 COPYRIGHT AND LICENSE
134 Copyright (C) 2008-2009 H.Merijn Brand
136 This library is free software; you can redistribute it and/or modify it
137 under the same terms as Perl itself.