in reply to introspection, or running pod2html on itself

Yikes. Your plan will require that end-users have 'pod2html' available to them, and that you can feed pod2html the original perl scripts which made your pp executable. And avoid hard-coded paths!

Instead, if you really want to internally pack your documentation so you only need to ship one executable file, I would suggest you run pod2html yourself, and stuff that into a __DATA__ block in one of the compiled script files. Then your --makedoc command can regurgitate that stuff into .html files directly.

I haven't used pp much; maybe it can even include various non-Perl files which are required by the executable. Then you wouldn't even need a __DATA__ hack to include the html content.

--
[ e d @ h a l l e y . c c ]

  • Comment on Re: introspection, or running pod2html on itself

Replies are listed 'Best First'.
Re^2: introspection, or running pod2html on itself
by punkish (Priest) on Sep 15, 2005 at 15:11 UTC
    Yikes. Your plan will require that end-users have 'pod2html' available to them, and that you can feed pod2html the original perl scripts which made your pp executable. And avoid hard-coded paths!
    Rats! That is a bloody good point, that I had not thought of. Given that, your suggestion for embedding the html as a __DATA__ block, or even as a scalar (using HEREDOC), and then spitting that out, might be the best for now.

    However, being able to spit out customized html might be worthwhile in other situations. For example, if I include a --configure option which configures the script for the user, then have --makdoc deliver a customized documentation. In that case, I would still need to figure out how to embed pod2html itself inside the .exe using pp.

    Any suggestions welcome.

    --

    when small people start casting long shadows, it is time to go to bed

      If you use a HEREDOC, you can have variables to interpolate inside it, meaning you can still dump custom documentation.

      If you take the __DATA__ route, you can use a template system to generate the custom docs.

      Finally, you could include the module POD::HTML in your packed executable and have a subroutine defined in your script that will require it and essentially do what pod2html does for you.

      <-radiant.matrix->
      Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
      The Code that can be seen is not the true Code
      "In any sufficiently large group of people, most are idiots" - Kaa's Law