Codebase list libdata-peek-perl / 714bc0b
Imported Upstream version 0.39 gregor herrmann 10 years ago
8 changed file(s) with 170 addition(s) and 109 deletion(s). Raw diff Collapse all Expand all
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>
15 * Backslashed { in regex in test to satisfy perl-5.17
26
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>
48 * Upped copyright to 2012
59 * Allow length for DHexDump ()
610
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>
812 * NAME / DISTNAME in Makefile.PL
913
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>
1115 * More cross-checks for META data
1216
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>
1418 * Tests require Test::More-0.88 or up (RT#70538)
1519 * Tested on perl-5.14.1 and 5.15.1
1620
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>
1822 * Added DTidy (): stream DDumper output through Perl::Tidy
1923 * Upped copyright to 2011
2024
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>
2226 * Require perl 5.8.0
2327 * DGrow tests for bigger gap
2428 * Spell checking
2529 * Add DHexDump ()
2630
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>
2832 * Dropped YAML spec to 1.0
2933
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>
3135 * Use $Data::Dumper::Quotekeys = 0; instead of removing the quotes myself
3236 * Put first hash element after opening lonely brace
3337 * Upped copyright to 2010
3438 * Use warn () instead of print STDERR
3539
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>
3741 * Use skip instead of skip_all for builds that have no DPeek ()
3842 * Be more lenient towards the allocated space
3943
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>
4145 * DDump () now dumps the variable itself, instead of a copy (Zefram)
4246 * Add DGrow ()
4347
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>
4549 * void context behaviour for DPeek ()
4650 * void context behaviour for DDual ()
4751
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>
4953 * Upped copyright to 2009
5054 * Corrected paren placement for bless (...)
5155 * Documentation fixes
5256 * Added Test::NoWarnings
5357 * Added DDsort ()
5458
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>
5660 * Wrong e-mail in META.yml
5761 * #34831 fixed tied $,
5862
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>
6064 * Implement DDisplay ()
6165 * Implement triplevar ()
6266 * Update ppport.h to 3.14_05 (mhx++)
6367 * 5.6.x DDisplay ()'s UTF8 different
6468 * make leaktest/leakcheck enabled and executed
6569
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>
6771 * Selecting to install DP did not install Data::Peek
6872
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>
7074 * Updated to ppport-3.14_01
7175 * YAML declared 1.4 (META.yml) instead of 1.1 (YAML)
7276 * DP.pm gets version from Peek.pm
7377 * DP.pm should not be installed in Data namespace
7478
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>
7680 * Typo in pod (Joshua Juran)
7781 * MSwin doesn't use plain \n (RT#39916)
7882 * Some MSWin (ActivePerl) and AIX builds do not have
7983 Perl_sv_peek () exported (RT#39916)
8084
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>
8286 * Renamed DDumper to Data::Peek
8387 * Default argument for DPeek is $_
8488 * Optionally install DP as shortcut for Data::Peek
8589 * Public git repo set up
8690
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>
8892 * Allocated length for PV's depends on arch (upped test to 8)
8993 * Released on Amsterdam.pm
9094
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>
9296 * Start writing tests for DDump ()
9397 * Added DDual ()
9498
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>
96100 * PerlIO is only available in 5.8 and up
97101 * Perl 5.6 is a minimal requirement for 'use warnings'
98102 * Tests for DPeek ()
102106 * Doc changes
103107 * In void context DDumper prints to STDERR
104108
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>
106110 * Initial attempt
00 {
11 "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",
513 "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",
1562 "generated_by" : "Author",
16 "version" : "0.38",
17 "name" : "Data-Peek",
1863 "author" : [
1964 "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 ]
4466 }
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'
00 #!/usr/bin/perl
11
2 # Copyright PROCURA B.V. (c) 2008-2012 H.Merijn Brand
2 # Copyright PROCURA B.V. (c) 2008-2013 H.Merijn Brand
33
44 require 5.008; # <- also see postamble at the bottom for META.yml
55 use strict;
1515 PREREQ_PM => { "DynaLoader" => 0,
1616 "Data::Dumper" => 0,
1717 "Test::More" => 0.88,
18 "Test::Harness" => 0,
1918 "Test::NoWarnings" => 0,
2019 },
2120 clean => { FILES => join " ", qw(
2625 cover_db
2726 valgrind.log
2827 )
28 },
29 macro => { TARFLAGS => "--format=ustar -c -v -f",
2930 },
3031 );
3132 $ExtUtils::MakeMaker::VERSION > 6.30 and $wm{LICENSE} = "perl";
134135
135136 =head1 COPYRIGHT AND LICENSE
136137
137 Copyright (C) 2008-2012 H.Merijn Brand
138 Copyright (C) 2008-2013 H.Merijn Brand
138139
139140 This library is free software; you can redistribute it and/or modify it
140141 under the same terms as Perl itself.
55 use DynaLoader ();
66
77 use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
8 $VERSION = "0.38";
8 $VERSION = "0.39";
99 @ISA = qw( DynaLoader Exporter );
1010 @EXPORT = qw( DDumper DTidy DDsort DPeek DDisplay DDump DHexDump
1111 DDual DGrow );
676676
677677 =head1 COPYRIGHT AND LICENSE
678678
679 Copyright (C) 2008-2012 H.Merijn Brand
679 Copyright (C) 2008-2013 H.Merijn Brand
680680
681681 This library is free software; you can redistribute it and/or modify
682682 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.
11 * This program is free software; you can redistribute it and/or
22 * modify it under the same terms as Perl itself.
33 */
5555
5656 =head1 COPYRIGHT AND LICENSE
5757
58 Copyright (c) 2008-2012 H.Merijn Brand. All rights reserved.
58 Copyright (c) 2008-2013 H.Merijn Brand. All rights reserved.
5959
6060 This program is free software; you can redistribute it and/or modify
6161 it under the same terms as Perl itself.
2323 my $var = "";
2424
2525 foreach my $test (@tests) {
26 my ($in, $out) = split m/\n--\n/ => $test;
26 my ($in, $expect) = split m/\n--\n/ => $test;
2727 $in eq "" and next;
2828 SKIP: {
2929 eval "\$var = $in;";
3737 @nl = ($dump =~ m/PV = 0x\w+ "([^"]+)".*"([^"]+)"/);
3838 diag "# This perl dumps \\n as (@nl)";
3939 # 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;
4141 }
4242 }
4343
4444 $dump =~ s/\b0x[0-9a-f]+\b/0x****/g;
4545 $dump =~ s/\b(REFCNT =) [0-9]{4,}/$1 -1/g;
4646
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?
4848
4949 $dump =~ s/\bPADBUSY\b,?//g if $] < 5.010;
5050
5151 $dump =~ s/\bUV = /IV = /g if $] < 5.008;
5252 $dump =~ s/,?\bIsUV\b//g if $] < 5.008;
5353
54 $in =~ s/[\s\n]+/ /g;
54 my @expect = split m/(?<=\n)\|\n+/ => $expect;
5555
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 }
5767 }
5868 }
5969
6878 PV = 0x**** ""\0
6979 CUR = 0
7080 LEN = 8
81 |
82 SV = PV(0x****) at 0x****
83 REFCNT = 1
84 FLAGS = (PADMY)
85 PV = 0
7186 ==
7287 0
7388 --
7893 PV = 0x**** ""\0
7994 CUR = 0
8095 LEN = 8
96 |
97 SV = PVIV(0x****) at 0x****
98 REFCNT = 1
99 FLAGS = (PADMY,IOK,pIOK)
100 IV = 0
101 PV = 0
81102 ==
82103 1
83104 --
88109 PV = 0x**** ""\0
89110 CUR = 0
90111 LEN = 8
112 |
113 SV = PVIV(0x****) at 0x****
114 REFCNT = 1
115 FLAGS = (PADMY,IOK,pIOK)
116 IV = 1
117 PV = 0
91118 ==
92119 ""
93120 --
98125 PV = 0x**** ""\0
99126 CUR = 0
100127 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