Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Re: Re: Quick Dumper

by diotalevi (Canon)
on Dec 03, 2003 at 13:40 UTC ( #311895=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Quick Dumper
in thread Quick Dumper

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?

Replies are listed 'Best First'.
Re: Re: Re: Re: Quick Dumper
by liz (Monsignor) on Dec 03, 2003 at 13:49 UTC
    $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 "" 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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2016-10-24 14:57 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (307 votes). Check out past polls.