Alex Francis wrote:
> On Wed, Jan 7, 2009 at 11:13 PM, Lyle <[email protected]> wrote:
>   
>> ...
>> Creating nasty looking dumps like:-
>>
>> $var->{array}->[0]->{key} = 'value';
>> $var->{array}->[0]->{array2}->[0] = 'one';
>>     
>
> Might I ask what for?
>
> It seems my colleagues are favouring JSON instead of Data::Dumper at the 
> moment.
>   

Thought the popular thing these days was YAML? Not that I've used either 
myself...

An example of the use would be dumping out the same variable with 
variations to two separate files that are later required in.

With a normal data dumper, you'd have to require one file, rename the 
variable, require the next, then merge.

Whereas if the dump has one value per line, like in my previous example, 
simply requiring in the two dumped files will give you a single merged 
variable.

I'm trying to avoid the normal load config -> parse it into variables 
approach. For a quicker load straight into variables...


Lyle

_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to