in reply to Perl does not recognize object method

Just a comment from the viewpoint of OOD:

The $switch object is currently created via:

my $switch = L_Switch -> new("", '127.0.0.1', "", "Veda");

which explicitly mentions "Veda" anyway. If this is instead rewritten as:

my $switch = L_Switch::L_Veda -> new("", '127.0.0.1', "");

there will be no need for a factory method constructor in the base class, and the implementation of L_Switch::new can be greatly simplified.

As a general rule, wherever possible a base class should know nothing about its subclasses. This makes for a simpler and much cleaner OO design.

Athanasius <°(((><contra mundum