in reply to Perl Module Documentation

perldoc -h would be a good starting point to find out "how."

Replies are listed 'Best First'.
Re^2: Perl Module Documentation
by BrowserUk (Patriarch) on Dec 20, 2011 at 18:12 UTC

    Does your perldoc help output show you options that mine doesn't?

    Cos I don't see anything there that suggests it converts installed module POD to an AS-style HTML treeview:

    c:\test>perldoc -h perldoc [options] PageName|ModuleName|ProgramName... perldoc [options] -f BuiltinFunction perldoc [options] -q FAQRegex perldoc [options] -v PerlVariable Options: -h Display this help message -V report version -r Recursive search (slow) -i Ignore case -t Display pod using pod2text instead of pod2man and nroff (-t is the default on win32 unless -n is specified) -u Display unformatted pod text -m Display module's file in its entirety -n Specify replacement for nroff -l Display the module's file name -F Arguments are file names, not modules -D Verbosely describe what's going on -T Send output to STDOUT without any pager -d output_filename_to_send_to -o output_format_name -M FormatterModuleNameToUse -w formatter_option:option_value -L translation_code Choose doc translation (if any) -X use index if present (looks for pod.idx at C:\Perl64\lib) -q Search the text of questions (not answers) in perlfaq[1-9] -f Search Perl built-in functions -v Search predefined Perl variables PageName|ModuleName... is the name of a piece of documentation that you want to look + at. You may either give a descriptive name of the page (as in the cas +e of `perlfunc') the name of a module, either like `Term::Info' or + like `Term/Info', or the name of a program, like `perldoc'. BuiltinFunction is the name of a perl function. Will extract documentation f +rom `perlfunc'. FAQRegex is a regex. Will search perlfaq[1-9] for and extract any questions that match. Any switches in the PERLDOC environment variable will be used before t +he command line arguments. The optional pod index file contains a list o +f filenames, one per line. [Perldoc v3.15]

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Re^2: Perl Module Documentation
by BrowserUk (Patriarch) on Dec 20, 2011 at 19:32 UTC

    Via /msg:

    ww says Re Re^2: Perl Module Documentation -d -T -o and note carefully that I said "starting point" -- NOT, here's a script to do the conversion

    Those options certainly did not stand out to me as a mechanism by which the OPs question could be solved.

    And even now you pointed them out I still wouldn't have a clue how to use them to solve his problem.

    Perhaps you would consider supplying a little more info on how to go about it?

    I asked because I would very much like to know how to do this. I have and use daily, minute by minute, the AS HTML treeview built by AS. But:

    1. it only includes modules installed by PPM, not those I build/install via other mechanisms;
    2. it includes POD for a whole bunch of stuff from the AS & standard distribution that I'm not interested in and would like to exclude.

      Eg. I Have no use for this lot:

      Getting Started Welcome To ActivePerl Release Notes Installation Guide Getting Started ActivePerl Change Log More Resources License and Copyright ActivePerl Components Overview Using PPM Windows Specific OLE Browser PerlScript PerlScript Examples PerlEz Perl for ISAPI ActivePerl FAQ Introduction Availability & Install Docs & Support Windows Specific FAQ Perl for ISAPI Windows 9X/Me/NT/200X/XP Windows Quirks Web Server Configuration Web Programming Windows Programming Modules & Samples Embedding & Extending Using OLE with Perl Windows Scripting Active Server Pages Windows Script Host Windows Script Components

      Or this junk:

      Or this stuff:

    3. and it includes whole heaps of stuff from some modules that I would like to exclude.

      Eg. This junk from Date::Manip

      Offset off000 off001 off002 off003 off004 off005 off006 off007 off008 off009 off010 off011 off012 off013 off014 off015 off016 off017 off018 off019 off020 off021 off022 off023 off024 off025 off026 off027 off028 off029 off030 off031 off032 off033 off034 off035 off036 off037 off038 off039 off040 off041 off042 off043 off044 off045 off046 off047 off048 off049 off050 off051 off052 off053 off054 off055 off056 off057 off058 off059 off060 off061 off062 off063 off064 off065 off066 off067 off068 off069 off070 off071 off072 off073 off074 off075 off076 off077 off078 off079 off080 off081 off082 off083 off084 off085 off086 off087 off088 off089 off090 off091 off092 off093 off094 off095 off096 off097 off098 off099 off100 off101 off102 off103 off104 off105 off106 off107 off108 off109 off110 off111 off112 off113 off114 off115 off116 off117 off118 off119 off120 off121 off122 off123 off124 off125 off126 off127 off128 off129 off130 off131 off132 off133 off134 off135 off136 off137 off138 off139 off140 off141 off142 off143 off144 off145 off146 off147 off148 off149 off150 off151 off152 off153 off154 off155 off156 off157 off158 off159 off160 off161 off162 off163 off164 off165 off166 off167 off168 off169 off170 off171 off172 off173 off174 off175 off176 off177 off178 off179 off180 off181 off182 off183 off184 off185 off186 off187 off188 off189 off190 off191 off192 off193 off194 off195 off196 off197 off198 off199 off200 off201 off202 off203 off204 off205 off206 off207 off208 off209 off210 off211 off212 off213 off214 off215 off216 off217 off218 off219 off220 off221 off222 off223 off224 off225 off226 off227 off228 off229 off230 off231 off232 off233 off234 off235 off236 off237 off238 off239 off240 off241 off242 off243 off244 off245 off246 off247 off248 off249 off250 off251 off252 off253 off254 off255 off256 off257 off258 off259 off260 off261 off262 off263 off264 off265 off266 off267 off268 off269 off270 off271 off272 off273 off274 off275 off276 off277 off278 off279 off280 off281 off282 off283 off284 off285 off286 off287 off288 off289 off290 off291 off292 off293 off294 off295 off296 off297 off298 off299 off300 off301 off302 off303 off304 off305 off306 off307 off308 off309 off310 off311 off312 off313 off314 off315 off316 off317 off318 off319 off320 off321 off322 off323 off324 off325 off326 off327 off328 off329 off330 off331 off332 off333 off334 off335 off336 off337 off338 off339 off340 off341 off342 off343 off344 off345 off346 off347 off348 off349 off350 off351 off352 off353 off354 off355 off356 off357 off358 off359 off360 off361 off362 off363 off364 off365 off366 off367 off368 off369 off370 off371 off372 off373 off374 off375 off376 off377 off378 off379 off380 off381 off382 off383 off384 off385 off386 off387 off388 off389 off390 off391 off392 off393 off394 off395 off396 off397 off398 off399 off400 off401 off402 off403 off404 off405 off406 off407 off408 off409 off410 off411 off412 off413 off414 off415 off416 off417 off418 off419 off420 off421 off422 off423 off424 off425 off426 off427 off428 off429 off430 off431 off432 off433 off434 off435 off436 off437 off438 off439 off440 off441 off442 off443 off444 off445 off446 off447 off448 off449 off450 off451 off452 off453 off454 off455 off456 off457 off458 off459 off460 off461 off462 off463 off464 off465 off466 off467 off468 off469 off470 off471 off472 off473 off474 off475 off476 off477 off478 off479 off480 off481 off482 off483 off484 off485 off486 Problems Recur TZ a00 afabid00 afaccr00 afaddi00 afalgi00 afasma00 afbama00 afbang00 afbanj00 afbiss00 afblan00 afbraz00 afbuju00 afcair00 afcasa00 afceut00 afcona00 afdaka00 afdar_00 afdjib00 afdoua00 afel_a00 affree00 afgabo00 afhara00 afjoha00 afjuba00 afkamp00 afkhar00 afkiga00 afkins00 aflago00 aflibr00 aflome00 afluan00 aflubu00 aflusa00 afmala00 afmapu00 afmase00 afmbab00 afmoga00 afmonr00 afnair00 afndja00 afniam00 afnoua00 afouag00 afport00 afsao_00 aftrip00 aftuni00 afwind00 amadak00 amanch00 amangu00 amanti00 amarag00 amarub00 amasun00 amatik00 ambahi00 ambahi01 ambarb00 ambele00 ambeli00 ambeul00 amblan00 amboa_00 ambogo00 ambois00 ambuen00 amcamb00 amcamp00 amcanc00 amcara00 amcata00 amcaye00 amcaym00 amcent00 amchic00 amchih00 amcord00 amcost00 amcuia00 amcura00 amdanm00 amdaws00 amdaws01 amdenv00 amdetr00 amdomi00 amedmo00 ameiru00 amel_s00 amfort00 amglac00 amgodt00 amgoos00 amgran00 amgren00 amguad00 amguat00 amguay00 amguya00 amhali00 amhava00 amherm00 amindi00 aminuv00 amiqal00 amjama00 amjuju00 amjune00 amknox00 amla_p00 amla_r00 amlima00 amlos_00 amloui00 ammace00 ammana00 ammana01 ammare00 ammart00 ammata00 ammaza00 ammend00 ammeno00 ammeri00 ammetl00 ammexi00 ammiqu00 ammonc00 ammont00 ammont01 ammont02 ammont03 ammont04 amnass00 amnew_00 amnew_01 amnipi00 amnome00 amnoro00 amojin00 ampana00 ampang00 ampara00 ampete00 amphoe00 amport00 amport01 amport02 ampuer00 amrain00 amrank00 amreci00 amregi00 amreso00 amrio_00 amrio_01 amsalt00 amsant00 amsant01 amsant02 amsant03 amsan_00 amsan_01 amsao_00 amscor00 amsitk00 amst_j00 amst_k00 amst_l00 amst_t00 amst_v00 amswif00 amtegu00 amtell00 amthul00 amthun00 amtiju00 amtoro00 amtort00 amtucu00 amushu00 amvanc00 amveva00 amvinc00 amwhit00 amwina00 amwinn00 amyaku00 amyell00 ancase00 andavi00 andumo00 anmacq00 anmaws00 anmcmu00 anpalm00 anroth00 ansyow00 anvost00 asaden00 asalma00 asamma00 asanad00 asaqta00 asaqto00 asashg00 asbagh00 asbahr00 asbaku00 asbang00 asbeir00 asbish00 asbrun00 aschoi00 aschon00 ascolo00 asdama00 asdhak00 asdili00 asduba00 asdush00 asgaza00 asharb00 ashong00 ashovd00 asho_c00 asirku00 asjaka00 asjaya00 asjeru00 askabu00 askamc00 askara00 askash00 askath00 askolk00 askras00 askual00 askuch00 askuwa00 asmaca00 asmaga00 asmaka00 asmani00 asmusc00 asnico00 asnovo00 asnovo01 asomsk00 asoral00 asphno00 aspont00 aspyon00 asqata00 asqyzy00 asrang00 asriya00 assakh00 assama00 asseou00 asshan00 assing00 astaip00 astash00 astbil00 astehr00 asthim00 astoky00 asulaa00 asurum00 asvien00 asvlad00 asyaku00 asyeka00 asyere00 atazor00 atberm00 atcana00 atcape00 atfaro00 atmade00 atreyk00 atsout00 atstan00 atst_h00 auadel00 aubris00 aubrok00 aucurr00 audarw00 aueucl00 auhoba00 aulind00 aulord00 aumelb00 aupert00 ausydn00 b00 c00 cet00 d00 e00 eet00 etgmt00 etgmtm00 etgmtm01 etgmtm02 etgmtm03 etgmtm04 etgmtm05 etgmtm06 etgmtm07 etgmtm08 etgmtm09 etgmtm10 etgmtm11 etgmtm12 etgmtm13 etgmtp00 etgmtp01 etgmtp02 etgmtp03 etgmtp04 etgmtp05 etgmtp06 etgmtp07 etgmtp08 etgmtp09 etgmtp10 etgmtp11 euamst00 euando00 euathe00 eubelg00 euberl00 eubrus00 eubuch00 eubuda00 euchis00 eucope00 eudubl00 eugibr00 euhels00 euista00 eukali00 eukiev00 eulisb00 eulond00 euluxe00 eumadr00 eumalt00 eumins00 eumona00 eumosc00 euoslo00 eupari00 euprag00 euriga00 eurome00 eusama00 eusimf00 eusofi00 eustoc00 eutall00 eutira00 euuzhg00 euvadu00 euvien00 euviln00 euvolg00 euwars00 euzapo00 euzuri00 f00 g00 h00 i00 inanta00 inchag00 inchri00 incoco00 incomo00 inkerg00 inmahe00 inmald00 inmaur00 inmayo00 inreun00 k00 l00 m00 met00 n00 o00 p00 paapia00 paauck00 pachat00 pachuu00 paeast00 paefat00 paende00 pafaka00 pafiji00 pafuna00 pagala00 pagamb00 paguad00 paguam00 pahono00 pakiri00 pakosr00 pakwaj00 pamaju00 pamarq00 pamidw00 panaur00 paniue00 panorf00 panoum00 papago00 papala00 papitc00 papohn00 paport00 pararo00 pasaip00 patahi00 patara00 patong00 pawake00 pawall00 q00 r00 s00 t00 u00 ut00 v00 w00 wet00 x00 y00 z00 TZdata TZ_Base Zones

      And this from somewhat similar crap from DateTime :

      And there's more. Much, much more!

    4. I can manually trim these out, but the next time I install a module with PPM, it rebuilds it all and everything reappears. I would really like to find a way to produce an HTML doc stack of just the bits of POD that I find useful.

    So you see. My question was not an idle one, but actually an attempt to illicit further info on how to go about this.

    The said. RTFM replies are only really useful if the information asked for is there and obvious and likely to be both recognised and understood by the OP. And despite the time I've been around Perl, your post did not help me answer the question.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Sorry; I thought you were gratuitously "bustin' my chops;" I see differently now and apologize for the deficiencies in my reply. They were numerous.

      The options I mentioned allow you to selectively produce a plain text file (formatted with spaces and newlines) of the relevant doc (and pod, TBOMK) using a CLI command like this (under Win):

      F:\pl_docs>perldoc -d nextpod.out -T -o f next Perldoc (Pod::Perldoc::ToText) output saved to nextpod.out

      The -d argument is the outfile name; -T says "don't page" and -o can specify a format, but is not something I've played with seriously. (Note, NO hyphen before the "f" preceding the function name. I have no clue why it works that way.)

      From there, wrap the output in minimal html,

      html <head> <title> <!-- (module or function title) --> </title> </head> <body> <pre> <!-- (content of your output from above, verbatim) --> </pre> </body> </html>

      However, automating the above in a script may be more work than I've considered. Making the .html 'semantic' would certainly be more work.

      So, in all honesty (/me flushes with pseudo-embarassment and pride at his self-congratulatory caveat), RichardK's pointer to Pod::Webserver now seems likely to be a far better way to do the job, unless it's bug-ridden. And in further honesty, you're right about needing to be obvious -- I just thought it would be to a Monk as experienced and wise (if sometimes, a tad sharp with others) as you. But since the post will stand for others, apologies, also, for failing to follow that guidance.

      But, afterthought, would you please stick <c>readmore<c>s in there somewhere?

        But, afterthought, would you please stick readmores in there somewhere?

        As all the long stuff is wrapped in <spoiler> tags, you should not be seeing any of it unless you explicitly click one of the links in: <Reveal this spoiler or all spoilers in this node or all in this thread>.

        Whereas, if I had used <readmore>'s, everyone would have to suffer it all as soon as they opened the post.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?