1 use POSIX qw(locale_h);
3 sub foo { "Subroutine foo called with args: @_"; }
7 sub foo_die { die "expiring..."; }
9 sub readvar { Exim::expand_string("\$$_[0]"); }
11 sub return_scalar { 42; }
13 sub return_list { (10,20,30); }
15 sub return_variable_vector { @x = (4,5,6); @x; }
17 sub return_hash { %x = ("a", 4, "b", 5); %x; }
19 sub debug_write { Exim::debug_write("$_[0]"); "Wrote debug"; }
21 sub log_write { Exim::log_write("$_[0]"); "Wrote log"; }
23 sub change_locale { setlocale(LC_TIME, "fr_FR"); "Changed locale"; }
25 sub foo_warn { warn "this is a warning"; "Wrote warning"; }
27 sub no_warn { $SIG{__WARN__} = sub { }; "Discarded warnings"; }