Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for code as primary? #3

Open
kenahoo opened this issue Jun 17, 2013 · 2 comments
Open

Support for code as primary? #3

kenahoo opened this issue Jun 17, 2013 · 2 comments

Comments

@kenahoo
Copy link

kenahoo commented Jun 17, 2013

This looks like a fantastic module, one that I've thought about writing for a long time. I wasn't aware of the Docopt effort, glad you can leverage it.

Is there any mode of usage that would let the code define the args itself, without doing POD lookups, and then let Dist::Zilla or some other bundling tool take the spec and insert it in the POD at dist-building time? To me that seems more compact and less action-at-a-distance.

@tokuhirom
Copy link
Owner

hmm. did you mean code like following?

docopt(doc => <<<'...');
Usage: foo bar
...

@kenahoo
Copy link
Author

kenahoo commented Jun 18, 2013

Yes, that looks right - I didn't read carefully enough to see that. Then the next piece would be to take that docstring and place it into the POD when building the dist.

Not sure if it's really a good idea or not, I just always thought of the options being defined by some mini-language in the code, then inserted into the docs at release time. Then for extra points, a zsh function that parses it for auto-completion. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants