Thread: POD Question

    #1
  1. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,452
    Rep Power
    594

    POD Question


    This is my first attempt to use POD and while it seems pretty simple, I am struggling with one part. I can't seem to get sample code to display properly. I cannot find much on this other than C<> but that does strange things like adding quotes (") at the beginning. Using a single new line character merges lines and a double new line, double spaces the lines. Can someone point in the right direction? TIA.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2007
    Posts
    765
    Rep Power
    929
    Indent a paragraph to make it format-preserving: perldoc perlpod.

    If you're using a Perl6::Perldoc-aware parser, you can also use explicit =begin code/=end code sections.

    If you still have problems, show an example of your POD and say which parser/formatter you're using to display it.
    sub{*{$::{$_}}{CODE}==$_[0]&& print for(%:: )}->(\&Meh);
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,932
    Rep Power
    1225
    If you post what you've tried, we can point out what's wrong.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,452
    Rep Power
    594
    Thanks but I got it. I read C<> to be specifically for code which apparently is wrong. I still don't really understand how and why it is used but by using '=item' on each line of the sample code, it formatted it the way I wanted.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    830
    Rep Power
    496
    Originally Posted by gw1500se
    by using '=item' on each line of the sample code, it formatted it the way I wanted.
    Indenting the code is probably a better idea.

IMN logo majestic logo threadwatch logo seochat tools logo