| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use MyTest; |
| 4 |
use Try::Tiny; |
| 5 |
|
| 6 |
BEGIN { |
| 7 |
require UUID; |
| 8 |
ok 1, 'loaded'; |
| 9 |
|
| 10 |
# :defer with extra args can only be called directly |
| 11 |
try { |
| 12 |
UUID::_defer(1,1); |
| 13 |
} |
| 14 |
catch { |
| 15 |
my $e = $_; |
| 16 |
# Too many arguments for _defer() at t/5defer/extra.t line 13. |
| 17 |
#note $e; |
| 18 |
my $f = __FILE__; |
| 19 |
$f =~ s/\\/\\\\/g; # windows! |
| 20 |
like $e, qr/Too many arguments for _defer\(\) at $f line/, 'correct'; |
| 21 |
}; |
| 22 |
|
| 23 |
ok 1, 'began'; |
| 24 |
} |
| 25 |
|
| 26 |
ok 1, 'done'; |
| 27 |
|
| 28 |
done_testing; |