i'm finding a really strange problem -- some OO code i've written runs just fine, both from command line and via CGI. and i thought it was a bit slow, so i attacked it w/ DProf.

but w/ DProf i'm getting all sorts of strange errors, like:

[Fri Feb 16 16:55:17 2001] test.cgi: Can't use string ("HOSTNAME") as +a HASH ref while "strict refs" in use at ....
i would think that if this were a problem,  perl -c test.cgi would barf on me, but it doesn't.

and, even though i don't think it's a good idea, i added  no strict 'refs'; in the block in question, and got:

[Fri Feb 16 16:56:50 2001] test.cgi: Can't call method "probe_for_serv +ices" without a package or object reference at ...

so here's the question -- why would the script in question only barf with Devel::DProf? i know perl can figure out 'the right thing to do' . . .

and, here's the Dumper output of the object in question ( with text substitutions to protect company info )

$VAR1 = bless( { 'RO_STRING' => 'public', 'HOSTNAME' => 'boo.foo.com' }, 'Host::HostProbe' );
which is the Dumper output i'd expect from a blessed hash.

i'm stumped. . .


In reply to errors profiling w/ Devel::DProf by geektron

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.