develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #118091] Split gv_fetchpvn_flags into smaller functions

Thread Previous
Leon Timmermans
May 23, 2013 15:21
Re: [perl #118091] Split gv_fetchpvn_flags into smaller functions
Message ID:
On Tue, May 21, 2013 at 5:23 PM, Brian Fraser <> wrote:
> [Please describe your issue here]
> That branch splits gv_fetchpvn_flags() into four helper functions:
> parse_gv_stash_name, which parses the name passed in to find a glob name
> and optionally a stash, find_default_stash, which, if the previous function
> didn't find a stash or some flags were passed in, looks for a suitable stash
> for the new glob, magicalize_gv, which adds magic to a newly-created glob,
> and
> maybe_multimagic_gv, which checks if an already-existing glob needs a
> different
> king of magic, ala *! needing to be magicalized for $! and %!.
> ...I'm not confident the names are all that descriptive, so feel free to
> suggest alternatives for those.
> The branch also adds some comments to make better sense of how it
> all works.  They are nowhere near comprehensive and need a second
> pair of eyes for correctness, but I think that anything that clarifies
> gv_fetchpvn_flags is a good step forward.

It looks ok to me. I really like having this split out properly, it
was somewhere on my todo list too, but somewhat low.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About