1 sub test_account_or_skip {
3 my($login, $password) = test_account($suffix);
5 unless( defined $login ) {
6 #plan skip_all => "No test account";
7 #not (yet?) using Test::More
8 print "ok 1 # Skipped: No test account\n";
12 return($login, $password);
16 my $suffix = shift || '';
17 $suffix = "_$suffix" if $suffix;
18 open TEST_ACCOUNT, "t/test_account$suffix" or return;
19 my($login, $password) = <TEST_ACCOUNT>;
23 return($login, $password);
27 my($month, $year) = (localtime)[4,5];
29 $year++; # So we expire next year.
30 $year %= 100; # y2k? What's that?
32 return sprintf("%02d/%02d", $month, $year);
36 my($day, $month, $year) = (localtime(time+86400))[3..5];
37 return sprintf("%04d-%02d-%02d", $year+1900, ++$month, $day);