#!/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();
In reply to Re: Distinguish between missing and undefined arguments with subroutine signatures
by choroba
in thread Distinguish between missing and undefined arguments with subroutine signatures
by jo37
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |