Well, if you integrate configuration files into the factory, your code becomes cleaner. Now lets say you stop using IO::Socket::Inet but switch to something else, you don't have to change from using IO::Socket everywhere, just change how the factory works.