This queue is for tickets about the Quantum-Superpositions CPAN distribution.

Report information
The Basics
Id:
4325
Status:
new
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
ben_tilly [...] operamail.com
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
2.02
Fixed in:
(no value)



Subject: True love in documentation can't be found (it's backwards)
I was trying to understand why "True love" in the documentation was impossible to find. It boiled down to this example: use Quantum::Superpositions; my $all = all("smart","Australian","rich"); my $any = any("smart","Australian","rich"); print "Yes 1\n" if $all eq $any; print "Yes 2\n" if $any eq $all; __END__ Yes 1 That is the order of comparison matters. (For reasons that are not that hard to figure out.) Therefore you can never find "True love" from this documented snippet (the any and all are reversed): $ideal = any( all("tall", "rich", "handsome"), all("rich", "old"), all("smart","Australian","rich") ); while (@features = get_description) { if (any(@features) eq $ideal) { print "True love"; } } I think that this order dependency should be clearly documented, and the documentation example should either be fixed by switching any(@features) with $ideal, or else it should be documented that "True love" is impossible to find (and why).
Oh, I forgot to mention that this came from a discussion on perlmonks, see http://www.perlmonks.org/index.pl?node_id=305142 for details.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.