A lot of languages allow the running of arbitrary code on install, so it is not particularly dangerous that Perl allowed it.
However you have no idea how many bugs got caught because the test run uncovered platform specific bugs. This is exactly what gave Perl a good name for being portable. Doubly so given that Perl always did this, starting back in the 1980s.