In pre-Perl 5.12 I've also implemented
sub not_impl {
die "Not implemented";
}
which makes it just a if ($some_clause) {
not_impl;
}
which is pretty close (semicolon optional here). Replace the die with your choice of thrown exception or confess or whatever, of course.I'm sure Ruby could do something similar. It may be less pretty but it works, and it is useful during certain types of development, I find.