Code Monkey home page Code Monkey logo

Comments (3)

igal avatar igal commented on August 24, 2024

I have a .perldb alias and vim macro that provides easy access to this because I used this facility so much. However, I'd recommend using Dump() or DUMP() as the name to indicate that this is a globally-accessible function and to reduce the possibility of namespace collisions with dump(), a frequently used sub name in user code.

from perl5i.

cowens avatar cowens commented on August 24, 2024

This is already done. The autobox::dump module, which the latest perl5i uses, adds a ->perl method to scalars, arrays, hashes, and coderefs. It uses Data::Dumper behind the scenes. A version than can use Data::Dump::Streamer or YAML is coming soon.

So, instead of saying

print Dumper \%hash;

you can now say

%hash->perl->print;

or

print %hash->perl

from perl5i.

schwern avatar schwern commented on August 24, 2024

Globally accessible functions, pah! This is 2009! Objects will control their means of dumping! (Also there's already a dump() function in Perl, though its nigh useless)

from perl5i.

Related Issues (20)

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.