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

Re: Things you can't do in a signatured sub

Thread Previous | Thread Next
From:
Matthew Persico
Date:
January 21, 2022 03:07
Subject:
Re: Things you can't do in a signatured sub
Message ID:
CAL20dLAnhOs0EbUCsQDDjQzkggu_e_1-mTVfB3WOKGGJapLNfg@mail.gmail.com
On Thu, Jan 20, 2022 at 4:20 AM Alexander Hartmaier <
alex.hartmaier@gmail.com> wrote:

>
> Seems I have missed the possibility to do that in perlsub (
> https://perldoc.perl.org/perlsub#Signatures). Maybe because the very
> first example which shows this special case is a complex one using lvalue
> and its variable is called @c. I'd suggest to start with a simpler example
> and have a dedicated one for that case which calls it @rest. (variables 'at
> rest' ;-)
>
> Thanks to all your input I've now converted all subs to signatured subs
> adding @ to the sig of all undocumented methods, just to be sure to not
> cause an exception.
>
> As the docs are pretty long, sub-headings 😂 would help to quicker find
> the correct example for ones use case.
> If there is an agreement on this I'm willing to write patch.
>

My USD 0.02: I'd write the patch and submit it. Waiting for "permission"
could take forever, but putting a concrete patch in front of people will
get their attention.

-- 
Matthew O. Persico

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