… | |
… | |
12 | # define SVt_LAST 16 |
12 | # define SVt_LAST 16 |
13 | #endif |
13 | #endif |
14 | |
14 | |
15 | #if !PERL_VERSION_ATLEAST (5,10,0) |
15 | #if !PERL_VERSION_ATLEAST (5,10,0) |
16 | # define SvPAD_OUR(dummy) 0 |
16 | # define SvPAD_OUR(dummy) 0 |
|
|
17 | #endif |
|
|
18 | |
|
|
19 | /* pre-5.10 perls always succeed, with 5.10, we have to check first apparently */ |
|
|
20 | #ifndef GvNAME_HEK |
|
|
21 | # define GvNAME_HEK(sv) 1 |
17 | #endif |
22 | #endif |
18 | |
23 | |
19 | #define res_pair(text) \ |
24 | #define res_pair(text) \ |
20 | do { \ |
25 | do { \ |
21 | AV *av = newAV (); \ |
26 | AV *av = newAV (); \ |
… | |
… | |
34 | } while (0) |
39 | } while (0) |
35 | |
40 | |
36 | #define res_gv(sigil) \ |
41 | #define res_gv(sigil) \ |
37 | res_text (form ("in the global %c%s::%.*s", sigil, \ |
42 | res_text (form ("in the global %c%s::%.*s", sigil, \ |
38 | HvNAME (GvSTASH (sv)), \ |
43 | HvNAME (GvSTASH (sv)), \ |
39 | GvNAMELEN (sv), \ |
44 | GvNAME_HEK (sv) ? GvNAMELEN (sv) : 11, \ |
40 | GvNAME (sv) ? GvNAME (sv) : "<anonymous>")) |
45 | GvNAME_HEK (sv) ? GvNAME (sv) : "<anonymous>")) |
41 | |
46 | |
42 | MODULE = Devel::FindRef PACKAGE = Devel::FindRef |
47 | MODULE = Devel::FindRef PACKAGE = Devel::FindRef |
43 | |
48 | |
44 | PROTOTYPES: ENABLE |
49 | PROTOTYPES: ENABLE |
45 | |
50 | |
… | |
… | |
172 | { |
177 | { |
173 | /* Values from constant functions are stored in the pad without any name */ |
178 | /* Values from constant functions are stored in the pad without any name */ |
174 | SV *name_sv = AvARRAY (AvARRAY (padlist)[0])[i]; |
179 | SV *name_sv = AvARRAY (AvARRAY (padlist)[0])[i]; |
175 | |
180 | |
176 | if (name_sv && SvPOK (name_sv)) |
181 | if (name_sv && SvPOK (name_sv)) |
177 | res_pair (form ("in the lexical '%s' in", SvPVX (name_sv))); |
182 | res_pair (form ("the lexical '%s' in", SvPVX (name_sv))); |
178 | else |
183 | else |
179 | res_pair ("in an unnamed lexical in"); |
184 | res_pair ("an unnamed lexical in"); |
180 | } |
185 | } |
181 | |
186 | |
182 | --depth; |
187 | --depth; |
183 | } |
188 | } |
184 | } |
189 | } |