On Fri, 27 Sep 2013, Mark D. Nagel wrote:
> On 9/27/2013 4:14 PM, David Lang wrote:
>>
>> remember that Perl variables (including hashes) that you create with one
>> rule can be
>> accessed by your perl code in any other rule.
>>
>> you don't _have_ to use varmap.
>>
>> If your flatten routine sets a variable %hash and then returns a reference
>> to it, you
>> can have other commands just access $hash{key}
>
> Fair enough, though that is only slightly less ugly than accessing the
> internal cache
> hash. flatten in general needs not care what the target varmap is, but I
> will see what I
> can do in that respect to make it be aware so the naming correct. Thanks for
> the idea!
actually, it occures to me that you can just use the hash that the json parse
creates, the thing that gets passed to flatten.
In fact, the more I think about it, the less it seems to be the right thing to
use flatten and cache.
Instead it seems like the right thing to do is to have one rule parse the data
and create the hash representation of it, and then just use perlfunc patterns
in
the rest of the rules and have them check the variables created by the first
rule.
David Lang
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users