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

[perl #120826] call_sv's docs are misleading

Thread Previous | Thread Next
bulk88 via RT
December 22, 2013 05:53
[perl #120826] call_sv's docs are misleading
Message ID:
On Thu Dec 19 06:26:12 2013, wrote:
> A comment in the source says "May be called with any of a CV, a GV, or an
> SV containing the name."
> But it also accepts a code reference. Specifically, when neither G_METHOD
> nor G_METHOD_NAMED was provided as a flag, it takes whatever pp_entersub
> takes.

Not testing this.

>    - AV*, HV* and undef are errors.

HV and undef are tested. AV should be pointless to test.

>    - sv == &PL_sv_yes is a no-op. It is documented as "unfound import,
>    ignore".


>    - GV*, CV*, code reference are accepted as the source of a CV*.


>    - Anything else is presumed to be a string.


> Note: "GV*" is defined as: SvTYPE(sv) == SVt_PVGV or SvTYPE(sv) == SVt_PVLV
> && isGV_with_GP(sv)

IDK how to get a LV/isGV_with_GP.

APITest patch attached. Note, some of things being tested are not (and I don't think they should) be public API or documented. If some of the tests are broken in the future, the tests should be fixed or removed, not the future code.

bulk88 ~ bulk88 at

via perlbug:  queue: perl5 status: open

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