Giter Club home page Giter Club logo

data-dump's People

Contributors

dsteinbrunner avatar gisle avatar tomill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

data-dump's Issues

Class names with '=' character not handled

The Perl interpreter does not place any restrictions on class names.

However, class names with an '=' sign cause Data::Dump to issue a warning such as:

Can't handle >Table2|t2=HASH data at c:/opt/strawberry/perl/vendor/lib/Data/Dump.pm line 377.

Data::Dump then cannot dump the instance data.

There is a rough test case at https://gist.github.com/rjattrill/5955171 which can be used to demonstrate this.

See also https://rt.perl.org/rt3//Public/Bug/Display.html?id=101814 for a similar bug.

The CPAN module DBIx::DataModel creates classes dynamically and uses '<=>'
to indicate result sets based on dynamic table joins.

Data::Dump::dump silently changes string to integer

Hi

I am using Data::Dump v1.23 and found issue that Data::Dump::dump sliently changes string to integer to cause YAML dump print incorrect result.

Here are the example code

use YAML::XS;
use Data::Dump;

my $data = { id => [ '0123', '0234']};

print "before dump\n";
print YAML::XS::Dump($data);

Data::Dump::dump($data);

print "after dump\n";
print YAML::XS::Dump($data);

And if i launch the script, you can find the second YAML::XS::Dump print element in $data as integer.

$ perl testy.pl
before dump

---
id:
- '0123'
- '0234'
{ id => ["0123", "0234"] }
after dump

---
id:
- 0123
- 0234

Maximum depth?

I really like the more compact display that Data::Dump outputs, compared to Data::Dumper, when debugging.

Sometimes I dump objects that have a lot of stuff in them (say, DBIx::Class, Catalyst-objects) and without a maximum depth setting, the output is humongous - but with one, I can ignore all the "deep" stuff, that I usually don't need.

Any chance of implementing such a setting/parameter/configuration?

pp($value) modify original value in parameter on perl 5.28.1

I have following "test-script.pl":

   use Data::Dump "pp";
   use JSON "to_json";

   my $a = ["12"];

   print "ORIG 1: ", to_json($a), "\n";
   print "PP: ", pp($a), "\n";
   print "ORIG 2: ", to_json($a), "\n";`

When I run it on perl 5.28.1, the original value in parameter is changed:

bash$ /opt/perl-5.28.1/bin/perl test-script.pl
ORIG 1: ["12"]
PP: [12]
ORIG 2: [12]

When I try same code in perl 5.26.3, the original value is not modified:

bash$ /opt/perl-5.26.3/bin/perl test-script.pl
ORIG 1: ["12"]
PP: [12]
ORIG 2: ["12"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.