For all that we love about Perl, please, please, please check return values when calling functions and object methods. And if writing such code, please incorporate differing return values based upon execution success.
/me returns to code maintenance and debugging
Fatal (Score:3, Interesting)
If your code works, it will be used.
Make sure that it provides enough information to fix the problem when it stops working.
If you don't like checking return values (most of the time it's just a matter of adding "or die $!"), let something (or someone) do it for you.
Reply to This
Don't return undef (Score:3, Informative)
1. Return $self
2. Return an 'interesting' value
3. Throw an exception
In general I'm slightly wary of object methods that return interesting values though, especially when those interesting values are simple attributes.
Reply to This
Re:Don't return undef (Score:2)
Re:Don't return undef (Score:2)
Re:Don't return undef (Score:1)