The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#! perl

use strict;
use warnings;
use Test::More;
use Statistics::R;

plan tests => 3;

my $R;

ok $R = Statistics::R->new();


eval {
   $R->run( q`print "ASDF"` );
};
ok $@, 'Syntax error';
# Actual error message vary depending on locale


eval {
   $R->run( q`print(ASDF)` );
};
ok $@, 'Runtime error';