G'day AnomalousMonk,

"Note that details of this behavior changed somewhere between versions 5.8 and 5.30.)"

I suspect that's 5.26.0: "perl5260delta: scalar(%hash) return signature changed". I don't have a pre-5.26 version handy to test that.

However, there's other things probably going on prior to the code shown in the OP:

I'm able to test this much (on 5.32.0):

# The sort of result that was no doubt expected: $ perl -e 'use Data::Dumper; my $hr = bless {a=>1}, "H::R"; my $r = $h +r; print Dumper $r' $VAR1 = bless( { 'a' => 1 }, 'H::R' ); # Reproduce output with stringification and embedded newline: $ perl -e 'use Data::Dumper; my $hr = bless {a=>1}, "H::R"; my $r = "$ +hr\n"; print Dumper $r' $VAR1 = 'H::R=HASH(0x800003b78) '; # No bucket allocation ratio for me; also no strict to advise of probl +em: $ perl -e 'use Data::Dumper; my $hr = bless {a=>1}, "H::R"; my $r = "$ +hr\n"; print Dumper %$r' # Problem advice when strict is used: $ perl -e 'use strict; use Data::Dumper; my $hr = bless {a=>1}, "H::R" +; my $r = "$hr\n"; print Dumper %$r' Can't use string ("H::R=HASH(0x800003b78) ") as a HASH ref while "strict refs" in use at -e line 1.

Bod, address the dot points above: there may be a solution in there. If that solves nothing, provide more code. Also, what Perl version are you using? (I seem to recall you had different versions on your local machine and your hosted server.)

— Ken


In reply to Re^2: Data::Dumper output by kcott
in thread Data::Dumper output by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.