Skip to content

Instantly share code, notes, and snippets.

@softmoth
Created August 14, 2012 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softmoth/3351102 to your computer and use it in GitHub Desktop.
Save softmoth/3351102 to your computer and use it in GitHub Desktop.
Code block with interesting indentation is parsed as 4 separate blocks
=begin pod
In other words, C<.WHY> and C<.WHEREFORE> are inverse operations:
.WHY
----------------------------
| |
| v
----------------- -----------------
| Declared code | | Documentation |
| object | | object |
----------------- -----------------
^ |
| |
----------------------------
.WHEREFORE
When the L<default C<DOC INIT> block|#How Pod is parsed and processed>
renders these Pod objects, it automatically includes information about
the declarator as well.
=end pod
# This is parsed as 4 Pod::Block::Code instead of just one.
$=pod.perl.say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment