in reply to Re: introspection, or running pod2html on itself
in thread 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!
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
  • Comment on Re^2: introspection, or running pod2html on itself

Replies are listed 'Best First'.
Re^3: introspection, or running pod2html on itself
by radiantmatrix (Parson) on Sep 15, 2005 at 20:38 UTC

    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