A dumpertest.imc is included, which shows the dumper in action.
I'am sorry, but I have no idea how to convert this to a test. BTW, is the
order of the hash elements guaranteed to be equal across platforms?
jens
> Here is a first version of a "Data::Dumper" i've written to be able to dump
> the AST of my C parser.
Wow, fine.
> A dumpertest.imc is included, which shows the dumper in action.
s/included/missing/ :)
> I'am sorry, but I have no idea how to convert this to a test.
Test::More provides C<is_deeply> to compare structures.
> ... BTW, is the
> order of the hash elements guaranteed to be equal across platforms?
Just the opposite, its guaranteed to be not the same even on one
platform, albeit a srand() like call is still missing to get really
random key order.
> .include "../../runtime/parrot/include/datatypes.pasm"
That should just be
.include "datatypes.pasm"
... at least, if run from parrot root (which we currently presume)
BTW - we still have the mess with 2 different library directories:
- library
- runtime/parrot/*
We really should clean that up, before more and more code goes in.
I'd rather have:
- runtime/parrot/lib
that is all files that need installation in one place.
leo
>
> > I'am sorry, but I have no idea how to convert this to a test.
>
> Test::More provides C<is_deeply> to compare structures.
Hmm, I'll have a look at it later. The C parser has a higher priority atm.
> > ... BTW, is the
> > order of the hash elements guaranteed to be equal across platforms?
>
> Just the opposite, its guaranteed to be not the same even on one
> platform, albeit a srand() like call is still missing to get really
> random key order.
>
> > .include "../../runtime/parrot/include/datatypes.pasm"
>
> That should just be
>
> .include "datatypes.pasm"
>
> ... at least, if run from parrot root (which we currently presume)
Oops, fixed. Now it is "runtime/parrot/lib/dumper.imc"
> BTW - we still have the mess with 2 different library directories:
> - library
> - runtime/parrot/*
>
> We really should clean that up, before more and more code goes in.
> I'd rather have:
>
> - runtime/parrot/lib
>
> that is all files that need installation in one place.
Sounds okay. The different include paths we have are a bit messy...
> leo
jens
I'am a bit messy, too :-)
Forgot to include the new file. The _init_dumper function is removed, it uses
the C<errorsoff> from latest CVS to prevent exception raising if the global
does not exists.
> > leo
>
> jens
So it would be really nice to have a "Data::Dumper" be able to sort
the keys, like the Perl one now can.
Tim.
That's not specific to Data::Dumper. We are just lacking a sort routine.
> Tim.
leo