Skip to content

Commit 786ca5a

Browse files
committed
Improve CUR::FileSystem example
Fixes #2766
1 parent c9b99f3 commit 786ca5a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/Type/CompUnit/Repository/FileSystem.pod6

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ C<ver>, and C<api>.
2727
2828
# assuming one is cloned into the zef git repository...
2929
my $repo = CompUnit::Repository::FileSystem.new(prefix => $*CWD);
30-
my $dist = $repo.candidates("Zef").head;
31-
say "Zef version: " ~ $dist.meta<version>;
30+
with $repo.candidates("Zef").head -> $dist {
31+
say "Zef version: " ~ $dist.meta<version>;
32+
}
33+
else {
34+
say "No candidates for 'Zef' found";
35+
}
3236
3337
=head2 method files
3438

0 commit comments

Comments
 (0)