We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fb512c commit 5a05c56Copy full SHA for 5a05c56
doc/Language/functions.pod
@@ -729,7 +729,7 @@ and it's signature is the means by which command line arguments can be parsed.
729
Multi methods are supported and a usage method is automatically generated and
730
displayed if no command line arguments are provided.
731
732
- sub MAIN ( Int :$length = 24, :file($data) = 'file.dat', Bool :$verbose ) {
+ sub MAIN ( Int :$length = 24, :file($data) where { .IO.f // die "file not found in $*CWD" } = 'file.dat', Bool :$verbose ) {
733
say $length if $length.defined;
734
say $data if $data.defined;
735
say 'Verbosity ', ($verbose ?? 'on' !! 'off');
0 commit comments