I want to create a generic class, whose builder would not return an instance of this generic class, but an instance of a dedicated children class.
As Moose does automatic object building, i do not get to understand if this something possible, and how to create a Moose class with Moose syntax and having this behaviour
Eg:
The user asks: $file = Repository-new(uri='sftp://blabla') .... and is returned an Repository::_Sftp instance
User would use $file as if it is a Repository instance, without the need to know the real subclass (polymorphism)