CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1784
content-type: text/html; charset=utf-8
last-modified: Sun, 12 Oct 2025 17:09:42 GMT
date: Sun, 12 Oct 2025 17:09:42 GMT
strict-transport-security: max-age=15768000
Re: embedded subs inside subs - nntp.perl.org
Front page | perl.perl6.users |
Postings from October 2025
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: embedded subs inside subs
Thread PreviousFrom:
ToddAndMargo via perl6-usersDate:
October 8, 2025 16:51Subject:
Re: embedded subs inside subsMessage ID:
6a203f16-4925-432c-b4bc-cf5b13de3832@zoho.comOn 10/8/25 12:43 AM, Elizabeth Mattijsen wrote: > > >> On 8 Oct 2025, at 09:08, ToddAndMargo via perl6-users <perl6-users@perl.org> wrote: >> >> On 10/8/25 12:01 AM, ToddAndMargo wrote: >>> Hi All, >>> Redeclaration of routine 'GetEsetInternetSecurity'. Did you >>> mean to declare a multi-sub? >>> at /home/linuxutil/./GetUpdates.raku:5161 >>> I meant to declare the same sub name INSIDE their own subs. >>> They are meant to be ONLY be active inside the subs >>> they are embedded in and ignored everywhere else. >>> Grrrrr...... >>> -T >> >> Never mind. I read something wrong in my code. >> >> And I am tired and in a rather too crabby mood >> to program. > > It's always good to take a step away from the keyboard every now and then. > > also: > > $ raku -e 'r 'sub a() { sub a() { 42 }; say a }; a' > 42 > > so that works fine. Although I would not recommend it, fwiw. Good Advice. I was trying to keep a sub I had written that was no longer applicable to what I needed becasue it had a lot of hard won coding as an example. I renamed it and replace it with the current code. But I must have hit ctrl-z to many times and removed the rename. To compound things, I mistook the error message as one of the embedded subs, which I still used in the new code. As you said it is good to step away sometimes. At least I did not waste tons of time chasing after missing/ extra brackets. That always fries me.Thread Previous
- embedded subs inside subs by ToddAndMargo via perl6-users
- Re: embedded subs inside subs by ToddAndMargo via perl6-users
- Re: embedded subs inside subs by Elizabeth Mattijsen
- Re: embedded subs inside subs by ToddAndMargo via perl6-users
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About