Imported Upstream version 0.39
gregor herrmann
10 years ago
0 | 0.38 2012-05-29, H.Merijn Brand <h.m.brand@xs4all.nl> | |
0 | 0.39 - 2013-08-17, H.Merijn Brand <h.m.brand@xs4all.nl> | |
1 | * Upped copyright to 2013 | |
2 | * Add alternative test results for 5.19.3 and up (COW and no PV for IV) | |
3 | ||
4 | 0.38 - 2012-05-29, H.Merijn Brand <h.m.brand@xs4all.nl> | |
1 | 5 | * Backslashed { in regex in test to satisfy perl-5.17 |
2 | 6 | |
3 | 0.37 2012-04-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
7 | 0.37 - 2012-04-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
4 | 8 | * Upped copyright to 2012 |
5 | 9 | * Allow length for DHexDump () |
6 | 10 | |
7 | 0.36 2011-09-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
11 | 0.36 - 2011-09-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
8 | 12 | * NAME / DISTNAME in Makefile.PL |
9 | 13 | |
10 | 0.35 2011-09-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
14 | 0.35 - 2011-09-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
11 | 15 | * More cross-checks for META data |
12 | 16 | |
13 | 0.34 2011-09-01, H.Merijn Brand <h.m.brand@xs4all.nl> | |
17 | 0.34 - 2011-09-01, H.Merijn Brand <h.m.brand@xs4all.nl> | |
14 | 18 | * Tests require Test::More-0.88 or up (RT#70538) |
15 | 19 | * Tested on perl-5.14.1 and 5.15.1 |
16 | 20 | |
17 | 0.33 2011-02-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
21 | 0.33 - 2011-02-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
18 | 22 | * Added DTidy (): stream DDumper output through Perl::Tidy |
19 | 23 | * Upped copyright to 2011 |
20 | 24 | |
21 | 0.32 2010-11-21, H.Merijn Brand <h.m.brand@xs4all.nl> | |
25 | 0.32 - 2010-11-21, H.Merijn Brand <h.m.brand@xs4all.nl> | |
22 | 26 | * Require perl 5.8.0 |
23 | 27 | * DGrow tests for bigger gap |
24 | 28 | * Spell checking |
25 | 29 | * Add DHexDump () |
26 | 30 | |
27 | 0.31 2010-03-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
31 | 0.31 - 2010-03-16, H.Merijn Brand <h.m.brand@xs4all.nl> | |
28 | 32 | * Dropped YAML spec to 1.0 |
29 | 33 | |
30 | 0.30 2010-02-14, H.Merijn Brand <h.m.brand@xs4all.nl> | |
34 | 0.30 - 2010-02-14, H.Merijn Brand <h.m.brand@xs4all.nl> | |
31 | 35 | * Use $Data::Dumper::Quotekeys = 0; instead of removing the quotes myself |
32 | 36 | * Put first hash element after opening lonely brace |
33 | 37 | * Upped copyright to 2010 |
34 | 38 | * Use warn () instead of print STDERR |
35 | 39 | |
36 | 0.29 2009-11-09, H.Merijn Brand <h.m.brand@xs4all.nl> | |
40 | 0.29 - 2009-11-09, H.Merijn Brand <h.m.brand@xs4all.nl> | |
37 | 41 | * Use skip instead of skip_all for builds that have no DPeek () |
38 | 42 | * Be more lenient towards the allocated space |
39 | 43 | |
40 | 0.28 2009-11-06, H.Merijn Brand <h.m.brand@xs4all.nl> | |
44 | 0.28 - 2009-11-06, H.Merijn Brand <h.m.brand@xs4all.nl> | |
41 | 45 | * DDump () now dumps the variable itself, instead of a copy (Zefram) |
42 | 46 | * Add DGrow () |
43 | 47 | |
44 | 0.27 2009-06-03, H.Merijn Brand <h.m.brand@xs4all.nl> | |
48 | 0.27 - 2009-06-03, H.Merijn Brand <h.m.brand@xs4all.nl> | |
45 | 49 | * void context behaviour for DPeek () |
46 | 50 | * void context behaviour for DDual () |
47 | 51 | |
48 | 0.26 2009-06-03, H.Merijn Brand <h.m.brand@xs4all.nl> | |
52 | 0.26 - 2009-06-03, H.Merijn Brand <h.m.brand@xs4all.nl> | |
49 | 53 | * Upped copyright to 2009 |
50 | 54 | * Corrected paren placement for bless (...) |
51 | 55 | * Documentation fixes |
52 | 56 | * Added Test::NoWarnings |
53 | 57 | * Added DDsort () |
54 | 58 | |
55 | 0.25 2008-11-24, H.Merijn Brand <h.m.brand@xs4all.nl> | |
59 | 0.25 - 2008-11-24, H.Merijn Brand <h.m.brand@xs4all.nl> | |
56 | 60 | * Wrong e-mail in META.yml |
57 | 61 | * #34831 fixed tied $, |
58 | 62 | |
59 | 0.24 2008-10-31, H.Merijn Brand <h.m.brand@xs4all.nl> | |
63 | 0.24 - 2008-10-31, H.Merijn Brand <h.m.brand@xs4all.nl> | |
60 | 64 | * Implement DDisplay () |
61 | 65 | * Implement triplevar () |
62 | 66 | * Update ppport.h to 3.14_05 (mhx++) |
63 | 67 | * 5.6.x DDisplay ()'s UTF8 different |
64 | 68 | * make leaktest/leakcheck enabled and executed |
65 | 69 | |
66 | 0.23 2008-10-21, H.Merijn Brand <h.m.brand@xs4all.nl> | |
70 | 0.23 - 2008-10-21, H.Merijn Brand <h.m.brand@xs4all.nl> | |
67 | 71 | * Selecting to install DP did not install Data::Peek |
68 | 72 | |
69 | 0.22 2008-10-20, H.Merijn Brand <h.m.brand@xs4all.nl> | |
73 | 0.22 - 2008-10-20, H.Merijn Brand <h.m.brand@xs4all.nl> | |
70 | 74 | * Updated to ppport-3.14_01 |
71 | 75 | * YAML declared 1.4 (META.yml) instead of 1.1 (YAML) |
72 | 76 | * DP.pm gets version from Peek.pm |
73 | 77 | * DP.pm should not be installed in Data namespace |
74 | 78 | |
75 | 0.21 2008-10-13, H.Merijn Brand <h.m.brand@xs4all.nl> | |
79 | 0.21 - 2008-10-13, H.Merijn Brand <h.m.brand@xs4all.nl> | |
76 | 80 | * Typo in pod (Joshua Juran) |
77 | 81 | * MSwin doesn't use plain \n (RT#39916) |
78 | 82 | * Some MSWin (ActivePerl) and AIX builds do not have |
79 | 83 | Perl_sv_peek () exported (RT#39916) |
80 | 84 | |
81 | 0.20 2008-10-08, H.Merijn Brand <h.m.brand@xs4all.nl> | |
85 | 0.20 - 2008-10-08, H.Merijn Brand <h.m.brand@xs4all.nl> | |
82 | 86 | * Renamed DDumper to Data::Peek |
83 | 87 | * Default argument for DPeek is $_ |
84 | 88 | * Optionally install DP as shortcut for Data::Peek |
85 | 89 | * Public git repo set up |
86 | 90 | |
87 | 0.16 2008-10-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
91 | 0.16 - 2008-10-07, H.Merijn Brand <h.m.brand@xs4all.nl> | |
88 | 92 | * Allocated length for PV's depends on arch (upped test to 8) |
89 | 93 | * Released on Amsterdam.pm |
90 | 94 | |
91 | 0.15 2008-09-26, H.Merijn Brand <h.m.brand@xs4all.nl> | |
95 | 0.15 - 2008-09-26, H.Merijn Brand <h.m.brand@xs4all.nl> | |
92 | 96 | * Start writing tests for DDump () |
93 | 97 | * Added DDual () |
94 | 98 | |
95 | 0.11 2008-09-25, H.Merijn Brand <h.m.brand@xs4all.nl> | |
99 | 0.11 - 2008-09-25, H.Merijn Brand <h.m.brand@xs4all.nl> | |
96 | 100 | * PerlIO is only available in 5.8 and up |
97 | 101 | * Perl 5.6 is a minimal requirement for 'use warnings' |
98 | 102 | * Tests for DPeek () |
102 | 106 | * Doc changes |
103 | 107 | * In void context DDumper prints to STDERR |
104 | 108 | |
105 | 0.10 2008-09-24, H.Merijn Brand <h.m.brand@xs4all.nl> | |
109 | 0.10 - 2008-09-24, H.Merijn Brand <h.m.brand@xs4all.nl> | |
106 | 110 | * Initial attempt |
0 | 0 | { |
1 | 1 | "resources" : { |
2 | "repository" : "http://repo.or.cz/w/Data-Peek.git", | |
3 | "license" : "http://dev.perl.org/licenses/" | |
4 | }, | |
2 | "license" : [ | |
3 | "http://dev.perl.org/licenses/" | |
4 | ], | |
5 | "repository" : { | |
6 | "type" : "git", | |
7 | "url" : "http://repo.or.cz/r/Data-Peek.git", | |
8 | "web" : "http://repo.or.cz/w/Data-Peek.git" | |
9 | } | |
10 | }, | |
11 | "version" : "0.39", | |
12 | "abstract" : "Modified and extended debugging facilities", | |
5 | 13 | "meta-spec" : { |
6 | "version" : 2, | |
7 | "url" : "https://metacpan.org/module/CPAN::Meta::Spec?#meta-spec" | |
8 | }, | |
9 | "test_requires" : { | |
10 | "Test::More" : "0.88", | |
11 | "Test::Harness" : "0", | |
12 | "Test::NoWarnings" : "0" | |
13 | }, | |
14 | "distribution_type" : "module", | |
14 | "version" : "2", | |
15 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" | |
16 | }, | |
17 | "name" : "Data-Peek", | |
18 | "license" : [ | |
19 | "perl_5" | |
20 | ], | |
21 | "dynamic_config" : 1, | |
22 | "prereqs" : { | |
23 | "configure" : { | |
24 | "requires" : { | |
25 | "ExtUtils::MakeMaker" : "0" | |
26 | } | |
27 | }, | |
28 | "test" : { | |
29 | "recommends" : { | |
30 | "Test::More" : "0.98" | |
31 | }, | |
32 | "requires" : { | |
33 | "Test::More" : "0.88", | |
34 | "Test::NoWarnings" : "0" | |
35 | } | |
36 | }, | |
37 | "build" : { | |
38 | "requires" : { | |
39 | "perl" : "5.008" | |
40 | } | |
41 | }, | |
42 | "runtime" : { | |
43 | "recommends" : { | |
44 | "Data::Dumper" : "2.145", | |
45 | "perl" : "5.016003", | |
46 | "Perl::Tidy" : "0" | |
47 | }, | |
48 | "requires" : { | |
49 | "Data::Dumper" : "0", | |
50 | "perl" : "5.008", | |
51 | "DynaLoader" : "0" | |
52 | } | |
53 | } | |
54 | }, | |
55 | "provides" : { | |
56 | "Data::Peek" : { | |
57 | "file" : "Peek.pm", | |
58 | "version" : "0.39" | |
59 | } | |
60 | }, | |
61 | "release_status" : "stable", | |
15 | 62 | "generated_by" : "Author", |
16 | "version" : "0.38", | |
17 | "name" : "Data-Peek", | |
18 | 63 | "author" : [ |
19 | 64 | "H.Merijn Brand <h.m.brand@xs4all.nl>" |
20 | ], | |
21 | "license" : "perl", | |
22 | "build_requires" : { | |
23 | "perl" : "5.008" | |
24 | }, | |
25 | "provides" : { | |
26 | "Data::Peek" : { | |
27 | "version" : "0.38", | |
28 | "file" : "Peek.pm" | |
29 | } | |
30 | }, | |
31 | "requires" : { | |
32 | "perl" : "5.008", | |
33 | "Data::Dumper" : "0", | |
34 | "DynaLoader" : "0" | |
35 | }, | |
36 | "recommends" : { | |
37 | "Test::More" : "0.98", | |
38 | "perl" : "5.016000", | |
39 | "Perl::Tidy" : "0" | |
40 | }, | |
41 | "abstract" : "Modified and extended debugging facilities", | |
42 | "configure_requires" : { | |
43 | "ExtUtils::MakeMaker" : "0" | |
65 | ] | |
44 | 66 | } |
45 | } |
0 | --- #YAML:1.0 | |
1 | name: Data-Peek | |
2 | version: 0.38 | |
3 | abstract: Modified and extended debugging facilities | |
4 | license: perl | |
5 | author: | |
6 | - H.Merijn Brand <h.m.brand@xs4all.nl> | |
7 | generated_by: Author | |
8 | distribution_type: module | |
9 | provides: | |
10 | Data::Peek: | |
11 | file: Peek.pm | |
12 | version: 0.38 | |
13 | requires: | |
14 | perl: 5.008 | |
15 | DynaLoader: 0 | |
16 | Data::Dumper: 0 | |
17 | configure_requires: | |
18 | ExtUtils::MakeMaker: 0 | |
19 | build_requires: | |
20 | perl: 5.008 | |
21 | test_requires: | |
22 | Test::Harness: 0 | |
23 | Test::More: 0.88 | |
24 | Test::NoWarnings: 0 | |
25 | recommends: | |
26 | perl: 5.016000 | |
27 | Perl::Tidy: 0 | |
28 | Test::More: 0.98 | |
29 | resources: | |
30 | license: http://dev.perl.org/licenses/ | |
31 | repository: http://repo.or.cz/w/Data-Peek.git | |
32 | meta-spec: | |
33 | version: 1.4 | |
34 | url: http://module-build.sourceforge.net/META-spec-v1.4.html | |
0 | --- | |
1 | abstract: Modified and extended debugging facilities | |
2 | author: | |
3 | - H.Merijn Brand <h.m.brand@xs4all.nl> | |
4 | build_requires: | |
5 | perl: '5.008' | |
6 | configure_requires: | |
7 | ExtUtils::MakeMaker: 0 | |
8 | dynamic_config: 1 | |
9 | generated_by: Author, CPAN::Meta::Converter version 2.132140 | |
10 | license: perl | |
11 | meta-spec: | |
12 | url: http://module-build.sourceforge.net/META-spec-v1.4.html | |
13 | version: '1.4' | |
14 | name: Data-Peek | |
15 | provides: | |
16 | Data::Peek: | |
17 | file: Peek.pm | |
18 | version: '0.39' | |
19 | recommends: | |
20 | Data::Dumper: '2.145' | |
21 | Perl::Tidy: 0 | |
22 | Test::More: '0.98' | |
23 | perl: '5.016003' | |
24 | requires: | |
25 | Data::Dumper: 0 | |
26 | DynaLoader: 0 | |
27 | Test::More: '0.88' | |
28 | Test::NoWarnings: 0 | |
29 | perl: '5.008' | |
30 | resources: | |
31 | license: http://dev.perl.org/licenses/ | |
32 | repository: http://repo.or.cz/r/Data-Peek.git | |
33 | version: '0.39' |
0 | 0 | #!/usr/bin/perl |
1 | 1 | |
2 | # Copyright PROCURA B.V. (c) 2008-2012 H.Merijn Brand | |
2 | # Copyright PROCURA B.V. (c) 2008-2013 H.Merijn Brand | |
3 | 3 | |
4 | 4 | require 5.008; # <- also see postamble at the bottom for META.yml |
5 | 5 | use strict; |
15 | 15 | PREREQ_PM => { "DynaLoader" => 0, |
16 | 16 | "Data::Dumper" => 0, |
17 | 17 | "Test::More" => 0.88, |
18 | "Test::Harness" => 0, | |
19 | 18 | "Test::NoWarnings" => 0, |
20 | 19 | }, |
21 | 20 | clean => { FILES => join " ", qw( |
26 | 25 | cover_db |
27 | 26 | valgrind.log |
28 | 27 | ) |
28 | }, | |
29 | macro => { TARFLAGS => "--format=ustar -c -v -f", | |
29 | 30 | }, |
30 | 31 | ); |
31 | 32 | $ExtUtils::MakeMaker::VERSION > 6.30 and $wm{LICENSE} = "perl"; |
134 | 135 | |
135 | 136 | =head1 COPYRIGHT AND LICENSE |
136 | 137 | |
137 | Copyright (C) 2008-2012 H.Merijn Brand | |
138 | Copyright (C) 2008-2013 H.Merijn Brand | |
138 | 139 | |
139 | 140 | This library is free software; you can redistribute it and/or modify it |
140 | 141 | under the same terms as Perl itself. |
5 | 5 | use DynaLoader (); |
6 | 6 | |
7 | 7 | use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK ); |
8 | $VERSION = "0.38"; | |
8 | $VERSION = "0.39"; | |
9 | 9 | @ISA = qw( DynaLoader Exporter ); |
10 | 10 | @EXPORT = qw( DDumper DTidy DDsort DPeek DDisplay DDump DHexDump |
11 | 11 | DDual DGrow ); |
676 | 676 | |
677 | 677 | =head1 COPYRIGHT AND LICENSE |
678 | 678 | |
679 | Copyright (C) 2008-2012 H.Merijn Brand | |
679 | Copyright (C) 2008-2013 H.Merijn Brand | |
680 | 680 | |
681 | 681 | This library is free software; you can redistribute it and/or modify |
682 | 682 | it under the same terms as Perl itself. |
0 | /* Copyright (c) 2008-2012 H.Merijn Brand. All rights reserved. | |
0 | /* Copyright (c) 2008-2013 H.Merijn Brand. All rights reserved. | |
1 | 1 | * This program is free software; you can redistribute it and/or |
2 | 2 | * modify it under the same terms as Perl itself. |
3 | 3 | */ |
55 | 55 | |
56 | 56 | =head1 COPYRIGHT AND LICENSE |
57 | 57 | |
58 | Copyright (c) 2008-2012 H.Merijn Brand. All rights reserved. | |
58 | Copyright (c) 2008-2013 H.Merijn Brand. All rights reserved. | |
59 | 59 | |
60 | 60 | This program is free software; you can redistribute it and/or modify |
61 | 61 | it under the same terms as Perl itself. |
23 | 23 | my $var = ""; |
24 | 24 | |
25 | 25 | foreach my $test (@tests) { |
26 | my ($in, $out) = split m/\n--\n/ => $test; | |
26 | my ($in, $expect) = split m/\n--\n/ => $test; | |
27 | 27 | $in eq "" and next; |
28 | 28 | SKIP: { |
29 | 29 | eval "\$var = $in;"; |
37 | 37 | @nl = ($dump =~ m/PV = 0x\w+ "([^"]+)".*"([^"]+)"/); |
38 | 38 | diag "# This perl dumps \\n as (@nl)"; |
39 | 39 | # Catch differences in \n |
40 | $dump =~ s/"ab\Q$nl[0]\E(.*?)"ab\Q$nl[1]\E/"ab\\n$1"ab\\n/; | |
40 | $dump =~ s/"ab\Q$nl[0]\E(.*?)"ab\Q$nl[1]\E/"ab\\n$1"ab\\n/g; | |
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | $dump =~ s/\b0x[0-9a-f]+\b/0x****/g; |
45 | 45 | $dump =~ s/\b(REFCNT =) [0-9]{4,}/$1 -1/g; |
46 | 46 | |
47 | $dump =~ s/\bLEN = (?:[1-9]|1[0-6])\b/LEN = 8/; # aligned at long long? | |
47 | $dump =~ s/\bLEN = (?:[1-9]|1[0-6])\b/LEN = 8/g; # aligned at long long? | |
48 | 48 | |
49 | 49 | $dump =~ s/\bPADBUSY\b,?//g if $] < 5.010; |
50 | 50 | |
51 | 51 | $dump =~ s/\bUV = /IV = /g if $] < 5.008; |
52 | 52 | $dump =~ s/,?\bIsUV\b//g if $] < 5.008; |
53 | 53 | |
54 | $in =~ s/[\s\n]+/ /g; | |
54 | my @expect = split m/(?<=\n)\|\n+/ => $expect; | |
55 | 55 | |
56 | is ($dump, $out, "DDump ($in)"); | |
56 | $in =~ s/[\s\n]+/ /g; | |
57 | ||
58 | my @match = grep { $dump eq $_ } @expect; | |
59 | if (@match == 1) { | |
60 | is ($dump, $match[0], "DDump ($in)"); | |
61 | } | |
62 | else { | |
63 | my $match = shift @expect; | |
64 | is ($dump, $match, "DDump ($in)"); | |
65 | diag ("DDump ($in) neither matches\n$_") for @expect; | |
66 | } | |
57 | 67 | } |
58 | 68 | } |
59 | 69 | |
68 | 78 | PV = 0x**** ""\0 |
69 | 79 | CUR = 0 |
70 | 80 | LEN = 8 |
81 | | | |
82 | SV = PV(0x****) at 0x**** | |
83 | REFCNT = 1 | |
84 | FLAGS = (PADMY) | |
85 | PV = 0 | |
71 | 86 | == |
72 | 87 | 0 |
73 | 88 | -- |
78 | 93 | PV = 0x**** ""\0 |
79 | 94 | CUR = 0 |
80 | 95 | LEN = 8 |
96 | | | |
97 | SV = PVIV(0x****) at 0x**** | |
98 | REFCNT = 1 | |
99 | FLAGS = (PADMY,IOK,pIOK) | |
100 | IV = 0 | |
101 | PV = 0 | |
81 | 102 | == |
82 | 103 | 1 |
83 | 104 | -- |
88 | 109 | PV = 0x**** ""\0 |
89 | 110 | CUR = 0 |
90 | 111 | LEN = 8 |
112 | | | |
113 | SV = PVIV(0x****) at 0x**** | |
114 | REFCNT = 1 | |
115 | FLAGS = (PADMY,IOK,pIOK) | |
116 | IV = 1 | |
117 | PV = 0 | |
91 | 118 | == |
92 | 119 | "" |
93 | 120 | -- |
98 | 125 | PV = 0x**** ""\0 |
99 | 126 | CUR = 0 |
100 | 127 | LEN = 8 |
128 | | | |
129 | SV = PVIV(0x****) at 0x**** | |
130 | REFCNT = 1 | |
131 | FLAGS = (PADMY,POK,IsCOW,pPOK) | |
132 | IV = 1 | |
133 | PV = 0x**** ""\0 | |
134 | CUR = 0 | |
135 | LEN = 8 | |
136 | COW_REFCNT = 0 |