in reply to Re: Boolean::all gone?
in thread Boolean::all gone?

well according to the link http://search.cpan.org/~ingy/boolean-0.11/lib/boolean.pm#AUTHOR

Ingy döt Net <ingy@cpan.org>

i was under the impression that this was the solution to bring a proper boolean technique to perl, but now that it's gone.... no one's using this?

Replies are listed 'Best First'.
Re^3: Boolean::all gone? (good?)
by tye (Sage) on Mar 07, 2008 at 07:07 UTC

    Given the following documented "Bug":

    Currently, assigning a boolean value to a variable causes the booleanity to be lost. This code dies:
    $x = true; isBoolean($x) || isTrue($x) or die;

    I'm not terribly surprised that such a fundamentally broken module isn't widely used. I've also never found the supposed lack of a boolean data type in Perl to be a problem. I also find the way that isTrue() and isFalse() are defined to look like really bad ideas (because they make the existance of such a fundamental bug not surprising).

    - tye        

Re^3: Boolean::all gone?
by grinder (Bishop) on Mar 07, 2008 at 13:22 UTC

    I had never heard of it. Although I tend to avoid Ingy's modules. Inline::C is great, but some of his other modules do weird things that sometimes reach out and bite you.

    I don't think true Boolean types are high up on anyone's list of things Perl needs. Most people seem to get by with truth. 0 (zero) and the empty string ('') are false, everything else is true. That seems to have worked pretty well for the past 20 years :)

    • another intruder with the mooring in the heart of the Perl

      .. I tend to avoid Ingy's modules. Inline::C is great

      I can relate to that. If I had to nominate the "most useful non-CORE module", it would be Inline::C.

      I look at his other efforts ... and then realise that Inline::C hasn't been updated in over 5 years (despite a growing list of bug reports) ... and I shake my head in disbelief.

      Cheers,
      Rob
Re^3: Boolean::all gone?
by Anonymous Monk on Mar 08, 2008 at 13:30 UTC
    "boolean" is not "Boolean::all"