metaperl has asked for the wisdom of the Perl Monks concerning the following question:
Logic::Kleene implements three-valued logic. For a long time,
I couldnt imagine a practical use of this, but now I know one: user
authentication. Currently, the authenticate method of
Mojolicious::Plugin::Authentication returns true if the user
authentication worked and false if not.
But there's a third possibility. He existed but did not authenticate. And presumably you would want different feedback to the user in that case. So 3-valued logic would be nice. But I think it's a bit fixed. Better just to return 0 for success and a status code for each form of failure?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A practical use of Logic::Kleene (3-valued logic)
by BrowserUk (Patriarch) on Sep 14, 2011 at 14:44 UTC | |
Re: A practical use of Logic::Kleene (3-valued logic)
by keszler (Priest) on Sep 14, 2011 at 14:15 UTC |
Back to
Seekers of Perl Wisdom