in reply to ISA with packages ... A barebones minimal example
You appear to be confusing package references with objects. Perl is not solely object-oriented, like Java or other langauages.
The B::method syntax is a package reference. It looks for a method inside package B. Adding a method to @EXPORT allows you to use that method without referencing the package directly.
What you are looking for is object inheritance. Objects don't need to be exported. You reference an object inside package B with B->object. If that object is a subroutine, it will be called (with parameters).
That's why everyone is saying "use B->". Your inclusion of A in @ISA causes B to inherit A's objects, but not package references. Do you understand?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ISA with packages ... A barebones minimal example
by Anonymous Monk on Oct 08, 2004 at 23:08 UTC | |
by radiantmatrix (Parson) on Oct 10, 2004 at 06:34 UTC | |
|
Re^2: ISA with packages ... A barebones minimal example
by tilly (Archbishop) on Oct 10, 2004 at 07:09 UTC |