Permalink
Browse files

start to document Pod classes

  • Loading branch information...
1 parent f1eb292 commit c386ae4351e8ba64ce8f5d0eabc8227374a6a66c @moritz moritz committed Aug 31, 2012
Showing with 106 additions and 0 deletions.
  1. +40 −0 lib/Pod/Block.pod
  2. +17 −0 lib/Pod/Block/Code.pod
  3. +23 −0 lib/Pod/Block/Named.pod
  4. +9 −0 lib/Pod/Block/Para.pod
  5. +17 −0 lib/Pod/Item.pod
View
@@ -0,0 +1,40 @@
+=begin pod
+
+=TITLE class Pod::Block
+
+ class Pod::Block { }
+
+Class for a Pod block, and base class for most other Pod classes.
+
+A Pod block has contents (more pod blocks or strings) and a config hash.
+
+Useful subclasses:
+
+=begin table
+
+ Class Used for
+ ===== ========
+ L<Pod::Block::Para> paragraphs
+ L<Pod::Block::Named> named blocks
+ L<Pod::Block::Code> code blocks
+ L<Pod::Block::Comment> comments
+ L<Pod::Block::Heading> =head1 etc. headings
+ L<Pod::Item> list items
+
+=end table
+
+=head1 Methods
+
+=head2 contents
+
+ method contents() returns Positional:D
+
+Returns a list of contents of this block.
+
+=head2 config
+
+ method config returns EnumMap:D
+
+Returns a hash of configs.
+
+=end pod
View
@@ -0,0 +1,17 @@
+=begin pod
+
+=TITLE class Pod::Block::Code
+
+ class Pod::Block::Code is Pod::Block { }
+
+Class for a code (verbatim) Pod block.
+
+=head1 Methods
+
+=head2 allowed
+
+ method allowed() returns Positional:D
+
+Returns a list of formatting codes that are allowed inside the code block.
+
+=end pod
View
@@ -0,0 +1,23 @@
+=begin pod
+
+=TITLE class Pod::Block::Named
+
+ class Pod::Block::Named is Pod::Block { }
+
+Class for a named Pod block. For example
+
+ =begin mysection
+ ...
+ =end mysection
+
+creates a C<Pod::Block::Named> with name C<mysection>.
+
+=head1 Methods
+
+=head2 name
+
+ method name() returns Str:D
+
+Returns the name of the block.
+
+=end pod
View
@@ -0,0 +1,9 @@
+=begin pod
+
+=TITLE class Pod::Block::Para
+
+ class Pod::Block::Para is Pod::Block { }
+
+Class for a Pod paragraph.
+
+=end pod
View
@@ -0,0 +1,17 @@
+=begin pod
+
+=TITLE class Pod::Item
+
+ class Pod::Item is Pod::Block
+
+Class for items in Pod enumeration lists.
+
+=head1 Methods
+
+=head2 level
+
+ method level() returns Int
+
+Returns the level of the enumeration list, starting at 1.
+
+=end pod

0 comments on commit c386ae4

Please sign in to comment.