Pike v8.0 release 1738

Method Program.inherit_tree()


Method inherit_tree

array inherit_tree(program p)

Description

Recursively builds a inheritance tree by fetching programs inheritance lists.

Returns

Returns an array with programs or arrays as elements.

Example

> class a{} > class b{} > class c{ inherit a; } > class d{ inherit b; inherit c; } > Program.inherit_tree(d); Result: ({ /* 3 elements */ d, ({ /* 1 element */ program }), ({ /* 2 elements */ c, ({ /* 1 element */ program }) }) })