Rosetta Code/Run examples: Difference between revisions

→‎{{header|Perl 6}}: WTH, add Tcl as well. Liberty Basic is probably not going to happen though
m (→‎{{header|Perl 6}}: Update demonstration task to reflect current code)
(→‎{{header|Perl 6}}: WTH, add Tcl as well. Liberty Basic is probably not going to happen though)
Line 588:
=={{header|Perl 6}}==
{{works with|Rakudo|2018.03}}
This is a fairly comprehensive task code runner. It is set up to work for Perl 6 by default, but has basic configurations to run Perl, Python, Tcl and Go tasks as well. It can be easily tweaked to work with other languages by adding a load-lang('whatever'){} routine similar to the Perl6, Perl, Python, Tcl and Go ones. (And ensuring that the appropriate compiler is installed and accessible.) There is so much variation to the task requirements and calling conventions that it would be problematic to make a general purpose, language agnostic code runner so some configuration is necessary to make it work with other languages.
 
(Note that there is no dependency download code nor resource hash for Python and Go, though they can run a remarkable number of tasks without.)
Line 943:
header => 'Go',
tag => rx/:i <?after '<lang ' 'go' '>' > .*? <?before '</' 'lang>'>/,
) }
 
multi load-lang ('tcl') { (
language => 'Tcl',
exe => 'tclsh',
ext => '.tcl',
dir => 'tcl',
header => 'Tcl',
tag => rx/:i <?after '<lang ' 'tcl' '>' > .*? <?before '</' 'lang>'>/,
) }
 
10,333

edits