HEX
Server: Apache
System: Linux server-634962.emtiyz.com 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: codo66ho (1003)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/.cpan/build/Template-Toolkit-3.102-0/t/math_rand.t
use strict;
use Test::More;
use Template;

plan tests => 1;

my @warnings;
local $SIG{__WARN__} = sub { push @warnings, @_ };
my $t = Template->new;
my $out;
$t->process(\<<EOF, {}, \$out) or die $t->error;
[% USE Math -%]
rand  with arg:    [% Math.rand(1000000) %]
rand  without arg: [% Math.rand %]
srand with arg:    [% Math.srand(1000000) %]
srand without arg: [% Math.srand %]
EOF
#diag $out;
is_deeply \@warnings, [], 'No warnings when calling rand/srand without arg';