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

Re: Pre-RFC: A Metaprogramming (Reflection and Introspection) API

Thread Previous | Thread Next
From:
breno
Date:
August 29, 2022 19:28
Subject:
Re: Pre-RFC: A Metaprogramming (Reflection and Introspection) API
Message ID:
CAHS-WQbTdvU5cxy8WCrm4xeizdhwSyYD9PENGVaNjECFRb1VkA@mail.gmail.com
On Fri, Aug 26, 2022 at 2:30 PM Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
wrote:

> Plus I'm open to the idea I may still have missed some useful
> abilities. The point of the RFC is not to create a fully-exhaustive
> list, but to create the module with enough useful pieces to begin with,
> in the hope that more will be added over time as the need becomes
> apparent.
>

Given a subroutine declaration with signatures, I'd love to be able to at
least see
variable names, "types" and defaults. I am unaware of any way to do it, and
I think it
would be good for auto-documentation and code completion within editors.

If a sub is called, I'd love to be able to easily inspect the name of the
variables passed to it.
Padwalker does it with var_name() but only to a certain extent (must be
refs, not copies, etc).
This is one of the most requested features in Data::Printer.


> Does this sound like a useful RFC to write? Shall I proceed?
>

YES!

Thread Previous | Thread Next


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