in reply to Distinguish between missing and undefined arguments with subroutine signatures
#!/usr/bin/perl use warnings; use strict; use experimental 'signatures'; use Syntax::Construct qw{ // }; sub show ($arg) { $arg // 'undef' } use Test::More; use Test::Exception; throws_ok { show() } qr/Too few arguments/; done_testing();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Distinguish between missing and undefined arguments with subroutine signatures
by jo37 (Curate) on Dec 27, 2020 at 17:41 UTC | |
by choroba (Cardinal) on Dec 27, 2020 at 18:08 UTC |