CUR = 5
LEN = \d+
MAGIC = $ADDR
- MG_VIRTUAL = &PL_vtbl_mglob
- MG_TYPE = PERL_MAGIC_regex_global\\(g\\)
+ MG_VIRTUAL = &PL_vtbl_regexp
+ MG_TYPE = PERL_MAGIC_study\\(G\\)
');
is (eval 'index "not too foamy", beer', 8, 'correct index');
CUR = 5
LEN = \d+
MAGIC = $ADDR
- MG_VIRTUAL = &PL_vtbl_mglob
- MG_TYPE = PERL_MAGIC_regex_global\\(g\\)
+ MG_VIRTUAL = &PL_vtbl_regexp
+ MG_TYPE = PERL_MAGIC_study\\(G\\)
');
}
{
PERL_ARGS_ASSERT_MAGIC_SETMGLOB;
PERL_UNUSED_CONTEXT;
+ PERL_UNUSED_ARG(sv);
mg->mg_len = -1;
- if (!isGV_with_GP(sv))
- SvSCREAM_off(sv);
return 0;
}
} else if (type == PERL_MAGIC_bm) {
SvTAIL_off(sv);
SvVALID_off(sv);
+ } else if (type == PERL_MAGIC_study) {
+ if (!isGV_with_GP(sv))
+ SvSCREAM_off(sv);
} else {
assert(type == PERL_MAGIC_fm);
}
{ PERL_MAGIC_env, "env(E)" },
{ PERL_MAGIC_envelem, "envelem(e)" },
{ PERL_MAGIC_fm, "fm(f)" },
+ { PERL_MAGIC_study, "study(G)" },
{ PERL_MAGIC_regex_global, "regex_global(g)" },
{ PERL_MAGIC_hints, "hints(H)" },
{ PERL_MAGIC_hintselem, "hintselem(h)" },
"/* envelem 'e' %ENV hash element */" },
{ 'f', "want_vtbl_regdata | PERL_MAGIC_READONLY_ACCEPTABLE | PERL_MAGIC_VALUE_MAGIC",
"/* fm 'f' Formline ('compiled' format) */" },
+ { 'G', "want_vtbl_regexp | PERL_MAGIC_READONLY_ACCEPTABLE | PERL_MAGIC_VALUE_MAGIC",
+ "/* study 'G' study()ed string */" },
{ 'g', "want_vtbl_mglob | PERL_MAGIC_READONLY_ACCEPTABLE | PERL_MAGIC_VALUE_MAGIC",
- "/* regex_global 'g' m//g target / study()ed string */" },
+ "/* regex_global 'g' m//g target */" },
{ 'H', "want_vtbl_hints",
"/* hints 'H' %^H hash */" },
{ 'h', "want_vtbl_hintselem",
#define PERL_MAGIC_env 'E' /* %ENV hash */
#define PERL_MAGIC_envelem 'e' /* %ENV hash element */
#define PERL_MAGIC_fm 'f' /* Formline ('compiled' format) */
-#define PERL_MAGIC_regex_global 'g' /* m//g target / study()ed string */
+#define PERL_MAGIC_study 'G' /* study()ed string */
+#define PERL_MAGIC_regex_global 'g' /* m//g target */
#define PERL_MAGIC_hints 'H' /* %^H hash */
#define PERL_MAGIC_hintselem 'h' /* %^H hash element */
#define PERL_MAGIC_isa 'I' /* @ISA array */
E PERL_MAGIC_env vtbl_env %ENV hash
e PERL_MAGIC_envelem vtbl_envelem %ENV hash element
f PERL_MAGIC_fm vtbl_regdata Formline ('compiled' format)
- g PERL_MAGIC_regex_global vtbl_mglob m//g target / study()ed string
+ G PERL_MAGIC_study vtbl_regdata study()ed string
+ g PERL_MAGIC_regex_global vtbl_mglob m//g target
H PERL_MAGIC_hints vtbl_hints %^H hash
h PERL_MAGIC_hintselem vtbl_hintselem %^H hash element
I PERL_MAGIC_isa vtbl_isa @ISA array
}
SvSCREAM_on(sv);
- /* piggyback on m//g magic */
- sv_magic(sv, NULL, PERL_MAGIC_regex_global, NULL, 0);
+ sv_magic(sv, NULL, PERL_MAGIC_study, NULL, 0);
RETPUSHYES;
}
desc => '%ENV hash element' },
fm => { char => 'f', vtable => 'regdata', value_magic => 1,
readonly_acceptable => 1, desc => "Formline ('compiled' format)" },
+ study => { char => 'G', vtable => 'regexp', value_magic => 1,
+ readonly_acceptable => 1, desc => 'study()ed string' },
regex_global => { char => 'g', vtable => 'mglob', value_magic => 1,
- readonly_acceptable => 1,
- desc => 'm//g target / study()ed string' },
+ readonly_acceptable => 1, desc => 'm//g target' },
hints => { char => 'H', vtable => 'hints', desc => '%^H hash' },
hintselem => { char => 'h', vtable => 'hintselem',
desc => '%^H hash element' },
pod/perlgpl.pod Verbatim line length including indents exceeds 80 by 50
pod/perlguts.pod ? Should you be using F<...> or maybe L<...> instead of 2
pod/perlguts.pod ? Should you be using L<...> instead of 1
-pod/perlguts.pod Verbatim line length including indents exceeds 80 by 26
+pod/perlguts.pod Verbatim line length including indents exceeds 80 by 25
pod/perlhack.pod ? Should you be using L<...> instead of 1
pod/perlhack.pod Verbatim line length including indents exceeds 80 by 1
pod/perlhacktips.pod Verbatim line length including indents exceeds 80 by 1