hackdaddy has asked for the wisdom of the Perl Monks concerning the following question:
I am designing a "configurable object" in Perl.
This configurable object would at runtime advertise its public methods, read/write attributes, method parameters, method parameter types, and return type.
Another object, say the configmgr object, would query the configurable object at runtime and then determine its properties, methods, and parameters. (Is it possible for the configmgr to dynamically inherit the configurable object?)
The configmgr would allow the user, through a dynamically created gui or console display, to input the parameters. If a parameter requires an object reference, the user could use a name that maps to a reference.
The configmgr would then allow the user to run the object with the newly set configuration and view its readable attributes and outputs.
Once the user was happy with the state of the invoked or un-invoked configurable object and its configuration, the user could save the configmgr object using Storable or write out the configuration (and optionally the runtime state) to a config file using AppConfig.
Later the user could restore the object and view it or reconfigure it.
Then the user could chain the saved configurable objects together and run them.
For instance, one configurable object could take the saved ("persisted") output of another configurable object as input.
Or, in another instance, the user could create the configurable object (through the configmgr) and then run it with its saved configuration or get the persisted runtime state.
Furthermore, if at runtime an error occurred in the configurable object, the configmgr could pop up a gui or display and let the user dynamically reconfigure the object to correct the error. Then the user could again save the configurable object and resume execution.
The next step would be to have a collection object that held together a collection of configmgr objects (and perhaps their scripted relationship). The collection object would internally have methods to calculate dependencies between the configmgr objects. The collection object could inherit from the configmgr class, allowing the whole collection to be saved and later recreated.