in reply to Re: cgi and own modules causing unspecified error
in thread cgi and own modules causing unspecified error
yes that's it. Expanding my example now, i get another error "Can't locate object method "new" via package "Hello" (perhaps you forgot to load "Hello"?)"
Hello.pm#!d:\perl\bin\perl.exe use lib 'S:\incubator\ex\Hello.pm'; print"Content-type:text/html;charset=UTF-8\n\n" ; my $obj = Hello->new( sample_data => 'hello world', more_data => 'blah blah blah' ); $obj->sample_method();
#!d:\perl\bin\perl.exe package Hello; #SampleObject; sub new { my ($class, %args) = @_; return bless { %args }, $class; } sub sample_method { my ($self) = @_; print $self->{sample_data}; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: cgi and own modules causing unspecified error
by stevieb (Canon) on Jun 08, 2017 at 14:43 UTC | |
by marto (Cardinal) on Jun 08, 2017 at 14:48 UTC | |
by amitsq (Beadle) on Jun 08, 2017 at 14:51 UTC | |
|
Re^3: cgi and own modules causing unspecified error
by marto (Cardinal) on Jun 08, 2017 at 14:46 UTC | |
|
Re^3: cgi and own modules causing unspecified error
by hippo (Archbishop) on Jun 08, 2017 at 14:38 UTC | |
by amitsq (Beadle) on Jun 08, 2017 at 14:45 UTC | |
by marto (Cardinal) on Jun 08, 2017 at 14:54 UTC |