Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Quick Dumper

by liz (Monsignor)
on Dec 03, 2003 at 13:13 UTC ( #311889=note: print w/ replies, xml ) Need Help??


in reply to Re: Quick Dumper
in thread Quick Dumper

Indeed. It's intended as a debugging tool. Ease of use is the only goal! Something that you would add as:

perl -Mdump yourprogram
and which would then allow you to call the "dump" method on your objects without any other changes to your program.

Liz


Comment on Re: Re: Quick Dumper
Download Code
Re: Re: Re: Quick Dumper
by diotalevi (Canon) on Dec 03, 2003 at 13:40 UTC

    What, just like that? I'm not sure how that would work since you'd have to have built in the ->dump method calls beforehand. Or do you include things like $obj->dump if $obj->can( 'dump' ) so it works in both cases?

      $obj->dump if $obj->can( 'dump' )

      Actually, I wouldn't do that, since you want the debug code removed from your source when running in production. So, by not loading "dump.pm" while in production, your program would bomb because the "dump" method no longer exists, forcing you to either remove or disable the line.

      Now, if we would have real assertions, this would be different.

      Liz

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://311889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2014-09-30 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (376 votes), past polls