Pat Hourigan has asked for the wisdom of the Perl Monks concerning the following question:
Coming from a java background, I have a component which I have designed so that the arguments that must be passed to the component are defined on an annotation. Therefore I enforce the documentation of the code alongside the injection of valid program arguments. Simply put, unless the developer annotate their component impl with the defined argument, then the argument will not be injected into the class. In the java space, this is all done through a pattern, so component implementations have intrinsic access to their args, once the class is loaded.
Now I want to take a similar paradigm and apply it to the Perl SpaceAny opinions on the best path forward? Can I use the standard perldoc on an instance of MyComponent, inpect that components perldoc and use it to validate and inject the arguments?
Any steers will be helpful, I can try it out and post my result up here if people find it useful.
Yours in interpreted heaven..p
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using PerlDoc to define the program arguments
by Corion (Patriarch) on Mar 29, 2012 at 14:27 UTC | |
by Pat Hourigan (Initiate) on Mar 29, 2012 at 15:29 UTC | |
|
Re: Using PerlDoc to define the program arguments
by chromatic (Archbishop) on Mar 29, 2012 at 17:56 UTC |