http://www.perlmonks.org?node_id=60941


in reply to Re: Re (tilly) 1: Readonly variable
in thread Readonly variable

You probably meant to turn on warnings as the second companion?

While those are good companions, based on my experience when I see that message I take a WAG that the message is really a sign of a non-obvious problem. At least that is how that message has worked for me. Sometimes having Perl tell you why it is giving you the message is not as useful as having someone with some scars tell you what the likely error is that caused that message...

Replies are listed 'Best First'.
use diagnostics (Re: Readonly variable)
by tye (Sage) on Feb 27, 2001 at 00:57 UTC

    But I thought that at least part of the point of diagnostics.pm was for people with scars to collect the likely list of reasons for each error.

            - tye (but my friends call me "Tye")
      True, but consider my point an addendum to point 8 of japhy's advice. Perl can tell you that it is seeing something invalid and describe in great detail why it is invalid. But it takes some experience to make from that an educated guess for why perl is getting invalid data. Since that is probably the question that has to be answered in the end anyways, that is very valuable. But unfortunately it isn't as easily bottled up into a module...