What is the difference between Data :: Dump and Data :: Dumper modules in Perl?

I have been using Data::Dumper for a long time. During a google search, I found another similar Data::Dump module.

Can someone tell me what are the main differences between the routines they provide?

+5
source share
1 answer

From Data :: Dump doc:

The Data :: Dump module has grown due to frustration with Sarati in most cases - the excellent Data :: Dumper. Key ideas and some code are shared with the Sarathy module.

The Data :: Dump module provides a much simpler interface than Data :: Dumper. There is no OO interface, and there are fewer configuration options to worry about. Another advantage is that the created dump does not try to set any variables. It returns only what is needed to create a copy of the arguments. This means that the dump ("foo") just returns "foo", and the dump (1..3) just returns "(1, 2, 3)".

+8
source

Source: https://habr.com/ru/post/1236587/


All Articles