Nathan Torkington wrote:
> John Porter writes:
> > Throw an exception in order to return a (0|'')-but-true value?
>
> If you want to indicate that there was an error in the code, why not
> die()? What am I missing?
I'm talking about the case where the require should "succeed" but
the return value is one which would evaluate to false, i.e.
package Foo;
initialize_myself();
my $n = how_many_frobnitzes_loaded();
$n; # may be 0
and then
my $n_frobs = require Foo;
But I admit this could be regarded as an edge case.
--
John Porter
- RFC 55 (v1) Compilation: Remove requirement for fina Perl6 RFC Librarian
- Re: RFC 55 (v1) Compilation: Remove requirement f... John Porter
- Re: RFC 55 (v1) Compilation: Remove requireme... Nathan Torkington
- Re: RFC 55 (v1) Compilation: Remove requi... John Porter
- Re: RFC 55 (v1) Compilation: Remove r... Nathan Torkington
- Re: RFC 55 (v1) Compilation: Rem... John Porter
- Re: RFC 55 (v1) Compilation:... Nathan Torkington
- Re: RFC 55 (v1) Compilation: Remove requi... Piers Cawley
- Re: RFC 55 (v1) Compilation: Remove requi... Andy Wardley
- Re: RFC 55 (v1) Compilation: Remove requirement f... Bart Lateur
- Re: RFC 55 (v1) Compilation: Remove requireme... John Porter
- Re: RFC 55 (v1) Compilation: Remove requirement f... Damian Conway
- Re: RFC 55 (v1) Compilation: Remove requireme... Bart Lateur
- Re: RFC 55 (v1) Compilation: Remove requi... Peter Scott
- Re: RFC 55 (v1) Compilation: Remove r... iain truskett
- Re: RFC 55 (v1) Compilation: Rem... Bryan C . Warnock
