in reply to Your use of assertions in Perl ?
As for assertions, I read a blog post recently where the author asserted that sane code generally had less else-clauses than otherwise. I've been looking at my code in that light and the code I find to be better has that property. I have a lot of unless-blocks of the form:
Same thing, right?sub foo { my $self = shift; my %args = @_; # Lots of these unless ( ... ) { return; } # Do the real thing }
|
|---|