NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
eval? (Score:1)
Re: (Score:2)
That's a lot longer to type and while it's theoretically clearer, I don't think it wins over an eval. Did I miss something obvious?
Re: (Score:1)
In general, using
evalwilly nilly is not good because you might swallow an exception that should have bubbled up. But a properly workingisais not expected to throw exceptions (or so I hope), so this idiom seems just fine.Re:eval? (Score:1)
You're absolutely right. An overridden
isa()that throws an would violate the Liskov substitution principle, so it would not in fact work properly.Reply to This
Parent