Front page | perl.perl6.users |
Postings from June 2018
June 14, 2018 17:12
Message ID: email@example.com
On 06/14/2018 09:11 AM, Timo Paulssen wrote:
> If it's literally just the name of a sub that you'll immediately invoke,
> you can side-step EVAL completely
> ::('&' ~ $RunSpecific)()
> should do the trick.
> ::("&foo") will give you the sub object, and putting () after it will
> immediately call it.
> It will allow access to all subs, even from the core, so subs like "die"
> and "exit" are reachable, but it's less dangerous than accepting any
> random code. For one, it will only work with subs that don't take arguments.
> - Timo
Perfect! Thank you!