sub load_widgets { my($self,$infh)=@_; # ^ IMPORTANT!!! $infh=new IO::File("<",$infh)unless ref$infh; #sorry open($fh...) needs undef ... }