1 sub test_account_or_skip {
3 my($login, $password) = test_account($suffix);
5 unless( defined $login ) {
6 plan skip_all => "No test account";
9 return($login, $password);
13 my $suffix = shift || '';
14 $suffix = "_$suffix" if $suffix;
15 open TEST_ACCOUNT, "t/test_account$suffix" or return;
16 my($login, $password) = <TEST_ACCOUNT>;
20 return($login, $password);
24 my($month, $year) = (localtime)[4,5];
25 $year++; # So we expire next year.
26 $year %= 100; # y2k? What's that?
28 return sprintf("%02d/%02d", $month, $year);
32 my($day, $month, $year) = (localtime(time+86400))[3..5];
33 return sprintf("%04d-%02d-%02d", $year+1900, ++$month, $day);