7

I have been using Data::Dumper for long times. While searching on google, I found one more similar module Data::Dump.

Can anyone let me know, what are the major differences between the subroutines provided by them?

serenesat
  • 4,611
  • 10
  • 37
  • 53
Kamal Nayan
  • 1,890
  • 21
  • 34
  • 1
    Related: http://stackoverflow.com/questions/11261854/is-there-a-less-verbose-alternative-to-perls-datadumper?rq=1 – Thilo Nov 23 '15 at 07:03

1 Answers1

11

From Data::Dump doc:

The Data::Dump module grew out of frustration with Sarathy's in-most-cases-excellent Data::Dumper. Basic ideas and some code are shared with Sarathy's module.

The Data::Dump module provides a much simpler interface than Data::Dumper. No OO interface is available and there are fewer configuration options to worry about. The other benefit is that the dump produced does not try to set any variables. It only returns what is needed to produce a copy of the arguments. This means that dump("foo") simply returns '"foo"', and dump(1..3) simply returns '(1, 2, 3)'.

Community
  • 1
  • 1
serenesat
  • 4,611
  • 10
  • 37
  • 53
  • 5
    It's worth noting that `Data::Dumper` is a core module whereas `Data::Dump` is not. – el.pescado - нет войне Nov 23 '15 at 07:33
  • 8
    Because stackoverflow seems to be a rather hostile environment (at least in the perl area). There seem to be quite a few people running around primarily casting downvotes and rarely ever casting an upvote. If something is not considered to be the "perfect" answer by them, they will strike you down with a righteous downvote. No matter that you put your time into writing a friendly answer trying to help the person. In my opinion perlmonks is the better forum if you have a Perl question. The tone is usually more civil than in Stackoverflow. – roland.minner Nov 23 '15 at 13:22
  • 1
    Thanks @serenesat for the explanation :) – Kamal Nayan Nov 23 '15 at 14:08