joesp
asked on
what does this code say it does?
what is in this code the line $self->error->throw($p) saying it does? there is no error function in the self itself (that is defined in the package which is the file)... tehre are other subroutines to be sure, but nothing called 'error'; so is it calling the throw member of another class and the class is called error?
# A shortcut, but we put the caller info in there so every error
# thrown doesn't appear to be coming from this location :)
sub throw {
my ( $self, $p ) = @_;
( $p->{package}, $p->{filename}, $p->{line} ) = caller;
$p->{action} = $self->{current_context}{a ction};
return $self->error->throw( $p );
}
the error I get running this piece of code is teh following:
Can't locate object method "error" via package "OpenInteract::Request" at /usr/lib/perl5/site_perl/5 .8.0//Open Interact/R equest.pm line 123.
anybody know what's going on here? I am looking for an interpretation of what the code is supposed to be accessing.
god bless,
joesp
# A shortcut, but we put the caller info in there so every error
# thrown doesn't appear to be coming from this location :)
sub throw {
my ( $self, $p ) = @_;
( $p->{package}, $p->{filename}, $p->{line} ) = caller;
$p->{action} = $self->{current_context}{a
return $self->error->throw( $p );
}
the error I get running this piece of code is teh following:
Can't locate object method "error" via package "OpenInteract::Request" at /usr/lib/perl5/site_perl/5
anybody know what's going on here? I am looking for an interpretation of what the code is supposed to be accessing.
god bless,
joesp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found out that this is a very generic error message. There is an error package (Error.pm) that comes with the distribution, and nothing with Error was the problem. When some error happened anywhere else (normally following a faulty installation of something or other) the error was triggered. thanks for all your help.
perl -MCPAN -e 'install Error'