summaryrefslogtreecommitdiff
path: root/ext/Pod-Html/lib
Commit message (Collapse)AuthorAgeFilesLines
* Increment $VERSION throughoutJames E Keenan2021-07-112-2/+2
|
* Re-arrange subs in calling orderJames E Keenan2021-07-112-141/+140
| | | | | | | I.e., first pod2html(), then its internal subs in order of (potential) call. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Use lowercase for lexical variables -- even filehandlesJames E Keenan2021-07-061-6/+6
| | | | Per rjbs code review in https://github.com/Perl/perl5/pull/18950
* After eval-ing $VERSION, assign return value back to $VERSIONJames E Keenan2021-07-061-2/+1
| | | | | | Remove superfluous assignment to @ISA. Per rjbs code review in https://github.com/Perl/perl5/pull/18950
* Pod-Html: rename Auxiliary.pm to Util.pmJames E Keenan2021-07-062-6/+6
| | | | Per rjbs code review in https://github.com/Perl/perl5/pull/18950
* Keep $VERSION in synchJames E Keenan2021-07-061-1/+1
|
* Introduce refine_parser()James E Keenan2021-07-061-49/+51
| | | | | | | | Further encapsulation of code internal to pod2html(). At this point we face obstacles: %Pages; $output. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Introduce generate_cache() and identify_input()James E Keenan2021-07-061-42/+61
| | | | | | Further encapsulation of code to improve readability. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Rename one method per suggestion from rjbsJames E Keenan2021-07-061-2/+2
|
* Introduce internal sub set_Title();James E Keenan2021-07-061-18/+23
| | | | | | | Encapsulate more code within pod2html(). The return value is for convenience. It's the setting inside $globals that counts. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Introduce internal sub refine_globals()James E Keenan2021-07-061-19/+25
| | | | | | Encapsulate! Encapsulate! Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Create internal sub parse_input_for_podtree()James E Keenan2021-07-061-13/+20
| | | | | | | | | This clears up a bit of semantic confusion. We were using one lexically scoped variable -- my $parser -- to hold two different objects: one for parsing input, one for writing output. We can encapsulate the working of the input parser to make the code more readable. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Remove last hard-tabs from Html.pmJames E Keenan2021-07-061-13/+12
| | | | Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Create sub write_file()James E Keenan2021-07-061-17/+21
| | | | | | | | We now start placing parts of sub pod2html() into separate subs so that we reduce the length of pod2html(), making it more readable and (ultimately) preparing for method calls. Signed-off-by: James E Keenan <jkeenan@cpan.org>
* Introduce Pod::Html::AuxiliaryJames E Keenan2021-07-062-246/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | This package will hold helper subroutines used within the main package or in tests. They can be placed in a separate module and imported into Pod::Html because they won't depend on having the globals passed as an argument. They will also be potentially independently testable. Start with html_escape(). Move anchorify(), htmlify() to Auxiliary.pm. Also _unixify -- now as unixify(). Move relativize_url() to Auxiliary. Move usage() to Auxiliary. Move trim_leading_whitespace to Auxiliary. Move parse_command_line() to Auxiliary. Keep porting tests happy. Increment $VERSION. Run: ./perl -Ilib regen/lib_cleanup.pl anchorify.t, eol.t: Correct excessive corrections. Standardize setting of $VERSION.
* Start refactoring lib/Pod/Html.pmJames E Keenan2021-07-061-133/+128
| | | | | | | | | | | | | Group all the "global" variables into a hashref $globals. This variable will be the return value of init_globals() within pod2html(), will be passed through, and augmented by, parse_command_line() and then used through the balance of pod2html(). In essence, so far this is just a renaming of variables. Remove declarations of superseded variables. Pass $globals to get_cache(), cache_key() and load_cache().
* Remove inheritance from Exporter in ext/ modulesMax Maischein2021-06-251-3/+2
| | | | | | | | | | | | | | | | | Inheriting from Exporter adds several subroutines that are not really needed by these modules. The remaining uses of inheritance from Exporter are: re.pm - this uses export_to_level(), which really, really wants the inheritance # Conflicts: # ext/File-Find/lib/File/Find.pm # ext/File-Glob/Glob.pm # ext/GDBM_File/GDBM_File.pm # ext/Opcode/Opcode.pm # ext/Pod-Html/lib/Pod/Html.pm
* Merge branch 'pod-html-duplicate-assignment-20210312' into bleadJames E Keenan2021-03-141-2/+1
|\
| * Eliminate double assignment from @_James E Keenan2021-03-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In lib/Pod/Html.pm's get_cache(), the arguments from @_ were being read into the file twice: once assigned to four distinct scalars, once to an array. That array was in turn fed into an internal subroutine -- which within itself assigned its elements to four distinct scalars. sub get_cache { my($dircache, $podpath, $podroot, $recurse) = @_; my @cache_key_args = @_; This approach may have made sense back in 1997 when the code first entered the core distribution. Some of the four scalars were and are used within get_cache(), while the array was at that time provided as argument for two internal subroutines. This approach, however, is of limited value today. We will likely to want to bundle up all these lexical variables into a hash or an object and just pass a single reference to internal subroutines. So let's eliminate the double assignment and eliminate one variable. Increment $VERSION.
* | Remove duplicate call to init_globals()James E Keenan2021-03-141-3/+1
|/ | | | | | The first call was added in a 2003 refactoring of the code in commit 99cb6bd822. It doesn't do anything other than what the second, older invocation does, so it's superfluous and deletable.
* Bump the versionScott Baker2020-11-031-1/+1
|
* Leave tabstops at 8Scott Baker2020-11-031-2/+1
|
* Use Text::Tabs to convert tabs to spaces insteadScott Baker2020-11-031-11/+4
|
* Change wording on source of codeScott Baker2020-11-031-1/+1
|
* Make pod2html remove whitespace from literal blocksScott Baker2020-11-031-0/+32
| | | | | This brings pod2html functionality similar to how Metacpan handles whitespace
* Reword pod2html crossref err msgs; show only if $verboseMarc Green2020-02-111-10/+17
| | | | Fixes #11860
* Fix Pod::Html for EBCDICKarl Williamson2017-12-271-2/+2
| | | | | | | | | | Commit 38e30ca7507a601c2d84596bc51d88c0f3c516b4 introduced a non-portable regular expression pattern which breaks the module on EBCDIC. Any range whose endpoints aren't both digits, both uppercase or both lowercase will not work on EBCDIC. /[^ -~]/ can more legibly and portably be written as /[[:^print:]]/a, which is what this commit does.
* fix links in generated HTML documentationZefram2017-12-141-12/+7
| | | | | | | | | Invoke installhtml in the right way for it to generate relative links. Fix installhtml's code for creating relative links in the index for split documents. Update Pod::Html's section name transformer to match the actual output seen via Pod::Simple::XHTML. Incidentally update split-on-head code for the new style of HTML generated by Pod::Simple::XHTML. Fixes [perl #110056].
* automatic titling in Pod::HtmlZefram2017-12-131-25/+60
| | | | | | | | | | | | Automatic extraction of a title from the content was lost with the switch to using Pod::Simple::XHTML for rendering. It would be tricky to add in Pod::Simple::XHTML, or anything else integrated into that parser, because the stream-oriented approach plays poorly with any kind of lookahead. Instead go to a two-stage conversion, parsing the input to tree form using Pod::Simple::SimpleTree and later feeding the tree to the stream-oriented Pod::Simple::XHTML for output. Between the two stages, extract a default title from the tree, in time to use it when setting options for Pod::Simple::XHTML. Fixes [perl #110520].
* Replace multiple 'use vars' by 'our' in extNicolas R2017-11-111-5/+4
| | | | | | | | Using vars pragma is discouraged and has been superseded by 'our' declarations available in Perl v5.6.0 or later. This commit is about replacing the usage of 'vars' pragma by 'our' in 'ext' directory.
* Don't recognize the --libpods option in Pod::HtmlAbigail2017-01-161-4/+2
| | | | | | | | Since Perl 5.18, the --libpods option has been recognized, but did not do anything other than issue a deprecation warnings. As of now, using the --libpods option creates an error. The version number of Pod::Html has bumped to 1.2202.
* (perl #127834) bump versions of modules in dists we updated a utility inTony Cook2016-07-261-1/+1
| | | | | | I tried to follow the numbering convention of the module, bumping every module if the versions are synchronized, bumping just the primary module if not.
* 'use locale' no longer ever fails.to compileKarl Williamson2014-06-051-6/+2
| | | | | Thus we can skip the machinations we used to do to make sure things compiled.
* Pod::Html: use parent instead of baseRicardo Signes2013-09-121-2/+2
|
* pod2html output concernsTony Cook2013-07-191-5/+3
|
* Synchronize pod2html usage output and its POD textPetr Písař2013-06-091-4/+9
|
* Revert "Bump Pod::Html to 1.19"Chris 'BinGOs' Williams2013-02-281-1/+1
| | | | This reverts commit 46b428ce5128df764ce460c744a3c4f0f9727b5b.
* Bump Pod::Html to 1.19Chris 'BinGOs' Williams2013-02-281-1/+1
|
* Enable perl core tests to pass when locale support is not available.Jess Robinson2013-02-091-3/+6
| | | | | | | | use locale - this will now die if $Config{d_setlocale} is not true. All tests that use locale will skip if $Config{d_setlocale} is not true. This enables us to pass tests on Android which uses ICU instead of locales. The committer removed trailing white space
* Make Pod::Html::_unixify unescape dots on VMS.Craig A. Berry2013-01-061-1/+2
| | | | | | Dots in directory names must be escaped in native syntax, but those escapes confuse various things if left in during a conversion to Unix syntax.
* Bump $Pod::Html::VERSION to reflect the changes of commit 978af2c644ee9abf.Nicholas Clark2012-06-041-1/+1
|
* Add --libpods back as a non-functional option to pod2html.Steve Peters2012-05-041-1/+3
| | | | | | When --libpods was removed, this broke backward compatiblility with existing uses. This change adds back the option, but warns that --libpods is no longer supported.
* Since the HTML files generated by pod2html claim to have a utf-8 charset,Steve Peters2012-05-041-0/+1
| | | | actually write the files out using utf-8. This is a fix for RT #111446.
* disable codes_in_verbatim for Pod::HtmlRicardo Signes2012-04-261-0/+1
| | | | ...otherwise all our verbatim blocks will change radically!
* Set *.html permissions in installhtml.Craig A. Berry2012-04-191-0/+1
| | | | | | | | | | | | Pod::Html::pod2html via the installhtml utility, which is invoked by the install.html make target, had not been explicitly setting permissions on the installed HTML files. Leaving the target permissions to chance meant that on some systems they were set appropriately and some not based on various site and platform defaults. "Appropriately" in this case means readable by world/other, so we now set that explicitly.
* allow "." in directory nameRicardo Signes2012-04-191-1/+1
| | | | | | This qualifies as another of the "crude hack to keep Pod-Html more usable" hacks that are in place until the path handling is fixed more systematically.
* make Pod-Html's _unixify normalize Win32 drive lettersRicardo Signes2012-04-151-1/+2
| | | | | | | | | | | Okay, look, this is kind of stupid and horrible, but it should stop smoke failures and actually address some forms of failed path comparisons in Pod::Html. In reality, we should be doing better path comparisons than checking substr and eq, but that's not going to get properly overhauled at this late date. In the meantime, this should fix Win32 smokers with forcibly lc()-ed cwds without breaking anybodye else, right? Right!
* Sisyphus's fix for pod2htmlRicardo Signes2012-03-121-0/+9
|
* Bump Pod::Html version.Craig A. Berry2012-02-281-1/+1
|
* Better cross-platform unixify for Pod::Html.Craig A. Berry2012-02-281-3/+25
| | | | | | | | | | This is mostly borrowed from CPANPLUS with additional tweaks to handle corner cases presented by the Pod::Html tests. It seems to work on VMS, Windows, and Mac OS X. Also tweak _save_page to make the call to ab2rel more robust in the case wherethe base is a special string indicating the current working directory ('./', '[]', or '.\') rather than a literal path.