Skip Menu |

This queue is for tickets about the Set-Object CPAN distribution.

Report information
The Basics
Id: 93516
Status: stalled
Priority: 0/
Queue: Set-Object

People
Owner: RURBAN [...] cpan.org
Requestors: smls75 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.34
Fixed in: (no value)



Subject: Nested set(set(), ...) ignores the first argument
If the first argument to Set::Object's set() function is itself the result of a set() call, it is silently ignored: use Set::Object qw(set); say set( set() )->size; # prints 0 (should print 1) say set( set(), "foo" )->size; # prints 1 (should print 2) say set( set(), set() )->size; # prints 1 (should print 2) say set( "foo", set() )->size; # prints 2, as it should say set( set(2, 4, 6), "foo" )->size; # prints 1 (should print 2) say set( "foo", set(2, 4, 6) )->size; # prints 2, as it should This is rather unexpected and makes it difficult to work with sets of sets.
On Tue Mar 04 08:54:24 2014, smls wrote: Show quoted text
> If the first argument to Set::Object's set() function is itself the > result of a set() call, it is silently ignored:
Agreed. I tried to fix it in the github branch method_set but it breaks many other tests. I'll have to check if those old test usages are all wrong.
On Wed Jun 10 18:40:49 2015, RURBAN wrote: Show quoted text
> On Tue Mar 04 08:54:24 2014, smls wrote:
> > If the first argument to Set::Object's set() function is itself the > > result of a set() call, it is silently ignored:
> > Agreed. I tried to fix it in the github branch method_set > but it breaks many other tests. > I'll have to check if those old test usages are all wrong.
No, they are not. I'm afraid, I couldn't come up with a convincing implementation which does fix this test but does not break the other tests. If someone else will come up, I'll happily merge. -- Reini Urban