Running Perl in Zerethon IDE

What Run does with your project, the time limit, input, tests, and what a run cannot do.

Runs in Zerethon IDE · Perl 5.40 Official Perl documentation ↗
  • Run (Ctrl/⌘+Enter) runs the entry file — main.pl by default — with Perl 5.40. Make another file the entry with the ▶ button next to it in the explorer.
  • Output and errors appear in the Output tab; warnings are printed there too, with the file and line. What you type in the Input tab is the program's standard input.
  • A run is stopped after 10 seconds. Memory is limited, there is no network, and the project files are read-only (write to /tmp).
  • Run tests (Ctrl/⌘+Shift+Enter) runs every file named test_*.pl, each in its own interpreter. A test file passes when it exits with status 0: die, or a failing Test::More check, fails it.
test_geometry.pl
use v5.40;
use lib ".";
use Test::More;
use Geometry qw(area);

is(area(2, 3), 6, "2 x 3");
is(area(0, 5), 0, "zero width");
done_testing;
A Test::More file for the Geometry.pm module from “Modules and several files”.

Tip: The editor highlights Perl and completes keywords and built-in functions. There is no formatter or live error checking yet: Run shows Perl's own messages.