in reply to Re^2: cgi and own modules causing unspecified error
in thread cgi and own modules causing unspecified error

Can't locate object method "new" via package "Hello" (perhaps you forgot to load "Hello"?)

The hint is right - you did forget to load "Hello". See use.

  • Comment on Re^3: cgi and own modules causing unspecified error

Replies are listed 'Best First'.
Re^4: cgi and own modules causing unspecified error
by amitsq (Beadle) on Jun 08, 2017 at 14:45 UTC
    adding the line  use "Hello" leads again to the error " The page cannot be displayed because an internal server error has occurred."

      You need to start looking at the error log of the webserver, if you're using CGI consider CGI::Carp. If you are starting from scratch I suggest looking at Mojolicious::Lite rather than CGI, see the documentation of the latter for some reasons why.