in reply to Re: CGI::Application and object inheritance
in thread CGI::Application and object inheritance
The order of your statements is deceptive. use happens at compile time, so your code actually runs them in the following order:
package Foo; use base 'CGI::Application'; use Bar; print "@ISA\n"; @ISA = ("Bar"); print "@ISA\n";
The first print should be wrapped in a begin to have it exected at before the use Bar.
Same results in this case, but it's something for which one should look out, especially when demonstrating a point.
|
|---|