4 ms·
> What happens when you need an "else" branch? Then you use one, but null checks generally aren't cases of if/else conditionals, they're more along the lines o
by masklinn 13y ago
> What happens when you need an "else" branch?
Then you use one, but null checks generally aren't cases of if/else conditionals, they're more along the lines of "either I have one or mayday mayday". Sometimes slightly softened into "either I have one or use this default thing"
- tbrownaw 13y agomore along the lines of "either I have one or mayday mayday". That would be the Perl way of my $person = $data_source->get_person($id) or die "No person available"; ie, there's code to be executed (to raise the error) in the case that there is no person. The callback structure from the article doesn't allow for this.