-
-
Save alabamenhu/b7179258120923a917970eb1c2d12ab1 to your computer and use it in GitHub Desktop.
Pod extract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What I'm thinking of is a way to allow something like this: | |
####################################################################### | |
=begin pod | |
=head1 Dog | |
{{|An animal that tends to bark}}. Many people really like how playful | |
they can be, and they're particularly known to be really great friends | |
to humans. | |
=end pod | |
class Dog { | |
method bark { say "bow wow" } | |
} | |
####################################################################### | |
Even though there's nothing directly attached to Dog, the goal would be | |
to have the text in {{}} (or some other delimiter) return be counted as | |
equivalent to having said | |
#| An animal that barks | |
class Dog { … } | |
As a potential extension of this, it might not be a bad idea to expand it | |
even further so that in the discussion, one could casually reference each | |
method in the larger pod, but have it all be attached. Such that | |
####################################################################### | |
=begin pod | |
=head1 Dog | |
{{|An animal that tends to bark}}. Many people really like how playful | |
they can be, and they're particularly known to be really great friends | |
to humans. To {{Dog.bark| say “hello!”}}, most dogs will bark. | |
=end pod | |
class Dog { | |
method bark { say "bow wow" } | |
} | |
####################################################################### | |
For which we could then say: | |
Dog.WHY --> "An animal that tends to bark" | |
Dog.bark.WHY --> "say “hello!”" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment