in reply to Error with creating new objects

I suspect you are falling foul of the core Switch module. A simple test would be to change the name of your module to TelnetSwitch or some other appropriate name.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: Error with creating new objects
by Anonymous Monk on Jun 25, 2012 at 07:08 UTC
    or add  use Data::Dump; dd \%INC, \@INC; to see which file is being loaded (Switch.pm)