On 10-05-20 03:52 PM, Uri Guttman wrote:
i didn't say it was for output but for debugging. and i didn't say YOU
shouldn't do it. i wrote for others to learn when to and not to use
Dumper. it isn't always the best choice. you can use it all the
time. they don't need to. simpler print/map is fine for them. and most
won't have source templates
I'm not going to waste time creating a fancy output for debugging. And
yes, I use it even for scalars. All my debugging statements have the
same pattern, which means they all have the same pattern in the output.
print '$name: ', Dumper \$name;
And the start of _every_ variable has VAR1 in it; makes it easy to spot.
As for when not to use it, don't use it for the final output, however
tempting it might be. Use it for debugging any way you want since
you're going to comment it out before the code goes into production.
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/