bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Workaround for Inconsistency in Namespace Internal Name Management


From: Andrew J. Schorr
Subject: Re: Workaround for Inconsistency in Namespace Internal Name Management
Date: Sun, 2 Jan 2022 10:41:13 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Hi John,

On Fri, Dec 31, 2021 at 12:55:50PM -0500, J Naman wrote:
> I do not know if bug-gawk@gnu.org is the appropriate venue for reporting
> workarounds to problems/issues/bugs. I will do it this time and until
> someone informs me of the proper process.
> My solution/workaround to the current Namespace Internal Name Management
> Inconsistency focuses on the intersection of indirect function calls and
> the newer Gawk Namespace feature:
> 
> function have(lst,key,fun) { *# update to Github aok/codingtips.aok by
> tim@menzies.us <tim@menzies.us>*
>     *sub(/^awk::/,"",fun);    *# change+ added because there is currently
> not 'awk::'s in FUNCTAB
>     #change- *if (fun)*           # tests if optional third argument
> constructor function
>     *if (fun in FUNCTAB)    *# change+ test if fun is actually in FUNCTAB
> to *avoid fatal error*
> #change+ #avoids: fatal: `foo' is not a function, so it cannot be called
> indirectly
>       @fun(lst[key])
> } # no more fatalities

I greatly appreciate your finding bugs and reporting them.  As Arnold explained
previously, what we really need are test cases that demonstrate the bug. That
will greatly facilitate the process of patching the code to get them fixed.

Best practice would be to attach an awk program that demonstrates the problem,
along with an explanation of what output you are seeing as opposed to what you
expect to see.

Thanks,
Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]