Page 1 of 1

$world->send doesn't run the alias engine. What can I do?

Posted: Wed Sep 13, 2023 6:05 pm
by Schmorgluck
I understand that it's its intended behavior, but $world->send not running what it sends through the aliases engine makes it a nightmare for me to develop a script I need.
Is there an alternative way to do it that I missed in the documentation?

Re: $world->send doesn't run the alias engine. What can I do?

Posted: Wed Sep 13, 2023 10:53 pm
by ekalin
Well, you have the full power of Perl, so you can do any kind of substitution you want.

But that's not really convenient if you want to use the same aliases available for interactive use. Fortunately there's the $world->expandaliases() function, that expands aliases as if they had been typed in the input box.

Re: $world->send doesn't run the alias engine. What can I do?

Posted: Fri Sep 15, 2023 4:53 pm
by Schmorgluck
Argh, thanks! I really should have searched the word "alias" on the "$world reference" page.