Skip Menu |

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

Report information
The Basics
Id: 4325
Status: new
Priority: 0/
Queue: Quantum-Superpositions

Owner: Nobody in particular
Requestors: ben_tilly [...]

Bug Information
Severity: Normal
Broken in: 2.02
Fixed in: (no value)

Subject: True love in documentation can't be found (it's backwards)
Download (untitled) / with headers
text/plain 1.1k
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).
Download (untitled) / with headers
text/plain 136b
Oh, I forgot to mention that this came from a discussion on perlmonks, see for details.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to