Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Defining, Testing and Documenting Perl?

by tobyink (Canon)
on Dec 23, 2019 at 22:00 UTC ( #11110563=note: print w/replies, xml ) Need Help??


in reply to Re: Defining, Testing and Documenting Perl?
in thread Defining, Testing and Documenting Perl?

Fun fact: the Moose "Bool" datatype will accept overloaded objects, but only if they stringify to "", "0", "1" or undef. It doesn't care what they boolify to!

Other fun fact: the Mouse "Bool" datatype will accept overloaded objects, but only if they boolify to a false value.

 

This is why Types::Standard 1.004 abandoned trying to be compatible with Moose and Mouse's definitions of "Bool" and instead just accepts "", "0", "1" and undef, but offers a coercion from other values.

  • Comment on Re^2: Defining, Testing and Documenting Perl?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11110563]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2020-05-27 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (155 votes). Check out past polls.

    Notices?