Lines Matching defs:stash

86     /* We get here if we're storing more than one linearisation for this stash,
155 Perl_mro_meta_init(pTHX_ HV* stash)
161 assert(HvAUX(stash));
162 assert(!(HvAUX(stash)->xhv_mro_meta));
164 HvAUX(stash)->xhv_mro_meta = newmeta;
219 the given stash. The return value is a read-only AV*
233 S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
245 assert(HvAUX(stash));
248 = HvAUX(stash)->xhv_name_u.xhvnameu_name && HvENAME_HEK_NN(stash)
249 ? HvENAME_HEK_NN(stash)
250 : HvNAME_HEK(stash);
260 meta = HvMROMETA(stash);
276 gvp = (GV**)hv_fetchs(stash, "ISA", FALSE);
299 /* if no stash exists for this @ISA member,
359 /* They have no stash. So create ourselves an ->isa cache
400 Returns the mro linearisation for the given stash. By default, this
402 other MRO is in effect for the stash. The return value is a
414 Perl_mro_get_linear_isa(pTHX_ HV *stash)
420 if(!HvHasAUX(stash))
423 meta = HvMROMETA(stash);
426 isa = meta->mro_which->resolve(aTHX_ stash, 0);
430 (HvHasENAME_HEK(stash) || HvHasNAME(stash))
431 ? newSVhek(HvHasENAME_HEK(stash)
432 ? HvENAME_HEK(stash)
433 : HvNAME_HEK(stash))
457 const HEK *canon_name = HvENAME_HEK(stash);
458 if (!canon_name) canon_name = HvNAME_HEK(stash);
506 Perl_mro_isa_changed_in(pTHX_ HV* stash)
517 const HEK * const stashhek = HvENAME_HEK(stash);
518 const char * const stashname = HvENAME_get(stash);
519 const STRLEN stashname_len = HvENAMELEN_get(stash);
527 /* wipe out the cached linearizations for this stash */
528 meta = HvMROMETA(stash);
559 HvAMAGIC_on(stash);
561 HvAUX(stash)->xhv_aux_flags &= ~HvAUXf_NO_DEREF;
577 /* First iteration: Wipe everything, but stash away the isa hashes
608 * avoid another round of stash lookups. */
670 linear_mro = mro_get_linear_isa(stash);
736 Call this function to signal to a stash that it has been assigned to
737 another spot in the stash hierarchy. C<stash> is the stash that has been
738 assigned. C<oldstash> is the stash it replaces, if any. C<gv> is the glob
744 This function invalidates isa caches on the old stash, on all subpackages
746 non-existent packages that have corresponding entries in C<stash>.
757 Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
767 assert(stash || oldstash);
769 /* Determine the name(s) of the location that stash was assigned to
784 * to see whether its stash has an effective name and whether the gv
785 * resides in that stash under its name. That effective name may be
871 stash, oldstash, namesv
902 HV *stash, HV *oldstash, SV *namesv)
908 const bool stash_had_name = stash && HvHasENAME(stash);
919 and stashes being replaced/deleted. (A nested stash can be on both
921 stash on the right if we have seen it on the left, as it will not
928 &PL_sv_no : seen on the right (stash)
1004 if(stash) {
1017 hv_ename_add(stash, name, len, name_utf8);
1037 seen_stashes, NULL, (const char *)&stash, sizeof(HV *), 0,
1041 stash = NULL;
1047 struct mro_meta * const meta = HvMROMETA(stash);
1050 stashes, (const char *)&stash, sizeof(HV *),
1061 if(!stash && !oldstash)
1073 If oldstash is null, then this is an empty spot with no stash in
1161 stashentry = stash ? hv_fetchhek(stash, HeKEY_hek(entry), 0) : NULL;
1218 if (stash && HvTOTALKEYS(stash)) {
1219 xhv = (XPVHV*)SvANY(stash);
1222 /* Iterate through the new stash, skipping $seen{$key} items,
1225 entry = (HvARRAY(stash))[riter];
1245 /* We get here only if this stash has no corresponding
1246 entry in the stash being replaced. */
1253 if(substash == stash) continue;
1303 of the given stash, so that they might notice
1312 are a few ways you could change a method in a stash
1316 1) Directly manipulating the stash HV entries from
1320 constant into a stash entry in order to create
1330 Perl_mro_method_changed_in(pTHX_ HV *stash)
1334 const char * const stashname = HvENAME_get(stash);
1339 const STRLEN stashname_len = HvENAMELEN_get(stash);
1341 SV ** const svp = hv_fetchhek(PL_isarev, HvENAME_HEK_NN(stash), 0);
1345 HvMROMETA(stash)->pkg_gen++;
1348 HvMROMETA(stash)->destroy_gen = 0;
1350 /* If stash is UNIVERSAL, or one of UNIVERSAL's parents,
1379 HvAMAGIC_on(stash);
1381 HvAUX(stash)->xhv_aux_flags &= ~HvAUXf_NO_DEREF;