At first, thanks for the hint.

Of course, all of my scripts usually start with

#/usr/bin/perl -w use strict;

But I have stripped out as much as possible to boil the example down to the really important things. In this case, the important thing is that the occurrence of an error message does not depend on using strictures or not (and thus the many documents I found on the web don't apply to my problem), but on the

use base ...

line. So I got an error message even without using strictures.

But you are right in that the error message changes if I put a

use strict;

at the beginning of the script. The message is then:

Bareword "MyHandler" not allowed while "strict subs" in use at test.pl line 5.
Execution of test.pl aborted due to compilation errors.

Unfortunately, that wouldn't have helped me either. I still wouldn't have known how to solve the problem. But the comment of choroba pointed me to the right direction (see other comment).

Thank you very much again,

Nocturnus


In reply to Re^2: Error: Can't use string as a hash ref by Nocturnus
in thread Error: Can't use string as a hash ref by Nocturnus

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.