in reply to changing object's methods at runtime
In your actual script, you'd use something like my $req=Apache::FakeRequest::ViceRaid->new() to instantiate your derived object.package Apache::FakeRequest::ViceRaid; use base qw(Apache::FakeRequest); sub lookup_uri { # do your stuff. }
The non-lvalue error means that you're assigning something to something else that cannot be assigned to. Things that you can assign to are lvalues, thus things that you can't assign to are non-lvalues. E.g.:
The nonlvalue subroutine is not an lvalue, so you get the error when you want to assign to it. perlsub has some information on how to make a subroutine return an lvalue.$ perl -e 'sub nonlvalue { return }; nonlvalue()=1;' Can't modify non-lvalue subroutine call in scalar assignment at -e lin +e 1, near "1;"
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: changing object's methods at runtime
by adrianh (Chancellor) on May 21, 2003 at 20:19 UTC | |
|
Re: Re: changing object's methods at runtime
by bart (Canon) on May 22, 2003 at 02:25 UTC |