develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Document PL_phase_names?

Thread Previous
From:
Felipe Gasper
Date:
August 5, 2021 22:16
Subject:
Re: Document PL_phase_names?
Message ID:
9B1193C5-208F-44A3-810D-D6EFB759CCA5@felipegasper.com

> 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
Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About