That's not how PAUSE or the Perl community works. Unless there's spam or some technical glitch, people are free to submit new CPAN modules in any namespace.
perl whatever.pl |& less]]>
You're right, Data::Printer has some quirks.
The prototype thing is a trade-off; it allows p
to treat an array variable with a single value differently than a scalar variable, and an array differently than a hash -- with the downside that you can only dump actual variables, not the results of anonymous expressions.
Give Data::Dump a try if you want something closer to the Data::Dumper experience but with less typing and with cleaner/terser output (and in particular, no silly "$VAR1 =
" noise in the output).
@Matt Perry
Technically, adding the four characters "2>&1
" to the command-line is less typing overhead than the difference between a single "print Dumper
" vs "p
"... :)
Not to mention it adds up if you want to use multiple dump statements in your code.
But you may have a point if you're working in an IDE that makes it annoying to temporarily change the way perl is called for test runs of the script.
local $Data::Dumper::Deparse = 1;
. And the $VAR1 =
crud in Data::Dumper can be suppressed using local $Data::Dumper::Terse = 1;
.
Overall, Data::Dump does a better job with whitespace though.
]]>2>&1
to pipe STDERR. Since version 4 (released five years ago), bash has supported a much simpler syntax borrowed from C shell and Korn shell:
command1 |& command2
This combines STDOUT and STDERR from command1
and pipes the result into command2
. Less typing, and much easier to remember!
It’s written by a guy who does Perl. :-) Which is what this site is about: people who do Perl.
]]>GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
Anyway, the first thing I do on any new Unixy box is:
chsh -s `which tcsh` `whoami`]]>
@tobyink for the issues that you have pointed out, I'd make it like so and never worry about it ever again:
{ use_prototypes => 0, return_value => 'pass', deparse => 1 class => { inherited => 'public', }, };
@mattperry for sending the output to stdout you can use a similar .dataprinter file as above, but also adding "output => 'stdout'".
I really wish you guys would give DDP another try and let me know if there is anything I can do in future releases to make it better!