digital_storm
05-16-2005, 04:39 AM
Hello
I have a little problem that I hope anyone can help me to solve.....
I have a cgi called cntrl.cgi where I do following:
--------------------ctrl.cgi-------------------------------------
my $status=Status->new($usr); #Constructor
.
.
$session->param('idkey',$status->getidkey()); ************************ I get an error here!
------------------------------------------------------------------
-------------------Status.pm--------------------------------
sub new {
$currnumber=shift;
my ($class) = @_;
my $self = {
_idkey=>$currnumber,
.
.
}
$self=getState(); #Are setting and controlling some values of current 'Status object'
bless $self, $class;
return $self;
}
sub getidkey(){
return $self->{_idkey};
}
.
.
.
1;
-------------------------------------------------------------------------------
Why do I get an error saying " Can't locate object method "getidkey" via package '+46859885086' " where '+46859885086' is the value of '$currnumber' that I do shift on in my constructor.(The error I get is located with ******************* above)
What should I do so I can find/access this object method?
Thanks in advance!
/D_S
I have a little problem that I hope anyone can help me to solve.....
I have a cgi called cntrl.cgi where I do following:
--------------------ctrl.cgi-------------------------------------
my $status=Status->new($usr); #Constructor
.
.
$session->param('idkey',$status->getidkey()); ************************ I get an error here!
------------------------------------------------------------------
-------------------Status.pm--------------------------------
sub new {
$currnumber=shift;
my ($class) = @_;
my $self = {
_idkey=>$currnumber,
.
.
}
$self=getState(); #Are setting and controlling some values of current 'Status object'
bless $self, $class;
return $self;
}
sub getidkey(){
return $self->{_idkey};
}
.
.
.
1;
-------------------------------------------------------------------------------
Why do I get an error saying " Can't locate object method "getidkey" via package '+46859885086' " where '+46859885086' is the value of '$currnumber' that I do shift on in my constructor.(The error I get is located with ******************* above)
What should I do so I can find/access this object method?
Thanks in advance!
/D_S