On Mon, Jun 27, 2005 at 11:36:13AM +1000, [EMAIL PROTECTED] wrote:
> >Another way to look at the "eval" case is to apply it to other references.
> >
> >     is_deeply( eval "{ foo => 42, bar => 23 }",
> >                { "bar", 42, "foo", 23 } );
> >
> >Even though the code is written differently the resulting data is the 
> >same.  Would anyone be in doubt that it should pass?
>
> I'm guessing that is_deeply tests for 'semantic equivalence', not 
> 'syntactic equivalence' - or is that a whole unopen can of worms?

is_deeply() never sees the difference!  Even though they're produced by 
different code they both result in exactly the same structure which is all
is_deeply() ever sees.  It can't see the original syntax.

Except that, umm, I wrote it backwards.

     is_deeply( eval "{ foo => 42, bar => 23 }",
                { "foo", 42, "bar", 23 } );

That's what I meant.

Its much the same way that this is expected to pass:

        is( 1 + 1, 2 );


-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
        -- "Witches Abroad" by Terry Prachett

Reply via email to