Mailing List Archive

Document PL_phase_names?
Hi all,

Would there be any problem with documenting PL_phase_names in perlapi? PL_phase is documented since 5.32, but we document the means by which the phase name is available.

I’ll submit a PR if it sounds agreeable.

Thank you!

cheers,
-FG
Re: Document PL_phase_names? [ In reply to ]
On Thu, Aug 5, 2021 at 10:04 PM Felipe Gasper <felipe@felipegasper.com>
wrote:

> Hi all,
>
> Would there be any problem with documenting PL_phase_names in
> perlapi? PL_phase is documented since 5.32, but we document the means by
> which the phase name is available.
>
> I’ll submit a PR if it sounds agreeable.
>
> Thank you!
>

In general, I think it's wiser to make functions API than interpreter
variables. They give much more maneuvering space when we want to change
something about the implementation.

Leon
Re: Document PL_phase_names? [ In reply to ]
> On Aug 5, 2021, at 5:14 PM, Leon Timmermans <fawaka@gmail.com> wrote:
>
> On Thu, Aug 5, 2021 at 10:04 PM Felipe Gasper <felipe@felipegasper.com> wrote:
> Hi all,
>
> Would there be any problem with documenting PL_phase_names in perlapi? PL_phase is documented since 5.32, but we document the means by which the phase name is available.
>
> I’ll submit a PR if it sounds agreeable.
>
> Thank you!
>
> In general, I think it's wiser to make functions API than interpreter variables. They give much more maneuvering space when we want to change something about the implementation.

Good point .. how about:

#define PL_phase_name(phase) (PL_phase_names[phase])

??

-F