6 require Config; import Config;
7 if ($Config{'extensions'} !~ /\bPeek\b/) {
8 print "1..0 # Skip: Devel::Peek was not built\n";
18 open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!";
22 if (open(OUT,">peek$$")) {
23 open(STDERR, ">&OUT") or die "Can't dup OUT: $!";
25 open(STDERR, ">&SAVERR") or die "Can't restore STDERR: $!";
27 if (open(IN, "peek$$")) {
29 $pattern =~ s/\$ADDR/0x[[:xdigit:]]+/g;
30 print $pattern, "\n" if $DEBUG;
32 print $dump, "\n" if $DEBUG;
33 print "[$dump] vs [$pattern]\nnot " unless $dump =~ /$pattern/ms;
37 die "$0: failed to open peek$$: !\n";
40 die "$0: failed to create peek$$: $!\n";
51 'SV = PV\\($ADDR\\) at $ADDR
53 FLAGS = \\(POK,pPOK\\)
61 'SV = PV\\($ADDR\\) at $ADDR
63 FLAGS = \\(.*POK,READONLY,pPOK\\)
70 'SV = IV\\($ADDR\\) at $ADDR
72 FLAGS = \\(IOK,pIOK\\)
77 'SV = IV\\($ADDR\\) at $ADDR
79 FLAGS = \\(.*IOK,READONLY,pIOK\\)
84 'SV = IV\\($ADDR\\) at $ADDR
86 FLAGS = \\(PADBUSY,PADMY,IOK,pIOK\\)
91 'SV = IV\\($ADDR\\) at $ADDR
93 FLAGS = \\(PADTMP,IOK,pIOK\\)
100 'SV = PVNV\\($ADDR\\) at $ADDR
102 FLAGS = \\(NOK,pNOK\\)
104 NV = 789\\.(?:1(?:000+\d+)?|0999+\d+)
111 'SV = IV\\($ADDR\\) at $ADDR
113 FLAGS = \\(.*IOK,READONLY,pIOK\\)
118 'SV = NULL\\(0x0\\) at $ADDR
124 'SV = RV\\($ADDR\\) at $ADDR
128 SV = PV\\($ADDR\\) at $ADDR
130 FLAGS = \\(POK,pPOK\\)
137 'SV = RV\\($ADDR\\) at $ADDR
141 SV = PVAV\\($ADDR\\) at $ADDR
152 SV = IV\\($ADDR\\) at $ADDR
154 FLAGS = \\(IOK,pIOK\\)
157 SV = IV\\($ADDR\\) at $ADDR
159 FLAGS = \\(IOK,pIOK\\)
164 'SV = RV\\($ADDR\\) at $ADDR
168 SV = PVHV\\($ADDR\\) at $ADDR
170 FLAGS = \\(SHAREKEYS\\)
173 ARRAY = $ADDR \\(0:7, 1:1\\)
174 hash quality = 100.0%
180 Elt "123" HASH = $ADDR
181 SV = IV\\($ADDR\\) at $ADDR
183 FLAGS = \\(IOK,pIOK\\)
188 'SV = RV\\($ADDR\\) at $ADDR
192 SV = PVCV\\($ADDR\\) at $ADDR
194 FLAGS = \\(PADBUSY,PADMY,POK,pPOK,ANON\\)
198 COMP_STASH = $ADDR\\t"main"
199 START = $ADDR ===> \\d+
203 GVGV::GV = $ADDR\\t"main" :: "__ANON__[^"]*"
204 FILE = ".*\\b(?i:peek\\.t)"
210 OUTSIDE = $ADDR \\(MAIN\\)');
214 'SV = RV\\($ADDR\\) at $ADDR
218 SV = PVCV\\($ADDR\\) at $ADDR
223 COMP_STASH = $ADDR\\t"main"
224 START = $ADDR ===> \\d+
228 GVGV::GV = $ADDR\\t"main" :: "do_test"
229 FILE = ".*\\b(?i:peek\\.t)"
235 \\d+\\. $ADDR \\("\\$pattern" \\d+-\\d+\\)
236 \\d+\\. $ADDR \\(FAKE "\\$DEBUG" 0-\\d+\\)
237 \\d+\\. $ADDR \\("\\$dump" \\d+-\\d+\\)
238 OUTSIDE = $ADDR \\(MAIN\\)');
242 'SV = RV\\($ADDR\\) at $ADDR
246 SV = PVMG\\($ADDR\\) at $ADDR
248 FLAGS = \\(OBJECT,RMG\\)
254 MG_TYPE = PERL_MAGIC_qr\(r\)
256 STASH = $ADDR\\t"Regexp"');
260 'SV = RV\\($ADDR\\) at $ADDR
264 SV = PVHV\\($ADDR\\) at $ADDR
266 FLAGS = \\(OBJECT,SHAREKEYS\\)
269 STASH = $ADDR\\t"Tac"
279 'SV = PVGV\\($ADDR\\) at $ADDR
281 FLAGS = \\(GMG,SMG,MULTI(?:,IN_PAD)?\\)
285 MG_VIRTUAL = &PL_vtbl_glob
286 MG_TYPE = PERL_MAGIC_glob\(\*\)
290 GvSTASH = $ADDR\\t"main"
302 FILE = ".*\\b(?i:peek\\.t)"
307 1 while unlink("peek$$");