-----BEGIN PGP SIGNED MESSAGE----- Moin,
On Tuesday 09 September 2003 16:29, Tony Bowden wrote: > On Tue, Sep 09, 2003 at 01:25:22PM +0100, Adrian Howard wrote: > > >1) ok $str1 eq $str2; > > >2) is $str1, $str2; > > >3) is_deeply [$str1], [$str2]; > > >4) is_deeply $str1, $str2; > > > > All should pass as far as I am concerned. > > OK - what if it was slightly more complex: Real world example: [*] [EMAIL PROTECTED]:~> perl -MTest::More -MMath::String -wle 'plan tests => 1; $a = Math::String->new("abc"); $b = $a->copy()->bneg(); ok $a,$b; print "$a != $b (", $a->as_number(), " != ", $b->as_number(),")";' 1..1 ok 1 - abc abc != abc (731 != -731) ok() considers them equal, since it uses "eq" internally. Should is_deeply() also consider them equal? Good question, I have no idea, never having uses is_deeply(). Best wishes, Tels *: Math::String objects are dualities, they have a string and a number representation. Now, there is a 1:1 mapping, except all negative numbers give the same string as positive ones. In praxis, this is usally ignored when talking about the 1:1 mapping, though. - -- Signed on Tue Sep 9 20:39:12 2003 with key 0x93B84C15. PGP key on http://bloodgate.com/tels.asc or per email. "Now, _you_ behave!" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBP14eWXcLPEOTuEwVAQHEygf5AXP35hMe9Ko5NFVCHRweMqdaex9wuTCP nksZ8rNi0ncgNElx2a0rOiNSU0BFAnPEVtAPjVkCek6egA7TYdqvu0pM6hfuUAZt YRZEkBhpxmFvWo2ysmux0Ya8KW4fDAicx18SVxS68250c7jhgo5DqmBCxxd7lXOH dLZYUN0c2pGFM3wnHAS8k0UnX6a3ueBvUQExcbshBEe4MAsf5wXGFofxSwsfc9wv HFchp3UJNef9GEThApjTowvcxTxcNL3i3J/iSLKT9+YyOai5NgLvHYF7H7shXgU/ 3/cyGvPXrye5WYo6EuDWLY/eVfDpjFJOhF4I0HcOoPqloxfzG0L4xw== =rB75 -----END PGP SIGNATURE-----