Reinier Post wrote:
2 in one, 4 in all.
Removing them produces another error during 'make test':

  t/Set_Relation_51_Database_in_Depth_Example.t .. 1/? # is_identical
  # restriction
  # projection
  Argument "city" isn't numeric in numeric ne (!=) at 
/var/cache/cpan/build/Set-Relation-0.12.7-8CX6n6/blib/lib/Set/Relation/V1.pm line 1844

The offending line is this, abbreviated:

    confess qq{$rtn_nm(): Bad $arg_nm arg;}
            . q{ it specifies a list of}
            . q{ attr names with at least one duplicated name.}
        if (uniq @{$atnms}) != @{$atnms};

What is supposed to happen here is that the presence of the scalar operator != will put both of its arguments into scalar context and so it should be comparing the count of elements of the lists on each side.

Your Perl seems to be behaving strangely in that it is instead flattening the lists and attempting a comparison on individual list elements.

That would suggest a bug in your Perl or some other strange thing about your 
system.

At least CPAN Testers is showing 127 passes and zero fails for Set::Relation 0.12.7, for many Perls from 5.8.x, 5.10.x, 5.12.x; only one of those is Cygwin, and it is Perl 5.8.8, which passes.

Maybe as an experiment you could try putting the word "scalar" before both arguments on that line and see if the tests get further.

General question: Is Perl supposed to take the arguments on both sides of a != in scalar context or was I relying on undocumented behavior that just happened to be the case everywhere else? I thought it was documented actually.

Perl 5.10.0 is also known to have some significant bugs in it; I
would use a newer version anyway if you can, 5.12.2 being the best.

Thanks.  I'll try that when I have time (it takes a lot of time to
recompile the CPAN modules and some don't take 'yes' for an answer).

The nature of your seeming unique problems with my module suggests you would have problems with various other CPAN modules too.

Since you're using Windows, I'd suggest trying Strawberry Perl and see if that works. It is a Windows-savvy Perl distro designed to work just like Unix Perl.

I've always been puzzled by the description of relational algebra
as an implementation language for relational calculus or SQL.
I mostly think in algebra, it feels more natural to me.

Well relational algebra and calculus are actually all defined in maths and logics etc, and SQL is a bastardized quasi-implementation of them, so people who think SQL equals relational (it doesn't) would have a rather distorted impression of the latter. I can understand some of what you're thinking.

Set::Relation is part of a wider body of work that I'm making to provide the actual relational model to people that they can use in everyday work.

I invite you to contact me privately to further discuss these matters.

-- Darren Duncan

Reply via email to