| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
I.e., first pod2html(), then its internal subs in order of (potential)
call.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
|
|
|
|
| |
Per rjbs code review in https://github.com/Perl/perl5/pull/18950
|
|
|
|
|
|
| |
Remove superfluous assignment to @ISA.
Per rjbs code review in https://github.com/Perl/perl5/pull/18950
|
|
|
|
| |
Per rjbs code review in https://github.com/Perl/perl5/pull/18950
|
| |
|
|
|
|
|
|
|
|
| |
Further encapsulation of code internal to pod2html().
At this point we face obstacles: %Pages; $output.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
|
|
|
|
|
|
| |
Further encapsulation of code to improve readability.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Encapsulate! Encapsulate!
Signed-off-by: James E Keenan <jkeenan@cpan.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: James E Keenan <jkeenan@cpan.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This brings pod2html functionality similar to how Metacpan handles
whitespace
|
|
|
|
| |
Fixes #11860
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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 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].
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Thus we can skip the machinations we used to do to make sure things
compiled.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 46b428ce5128df764ce460c744a3c4f0f9727b5b.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
actually write the files out using utf-8. This is a fix for RT #111446.
|
|
|
|
| |
...otherwise all our verbatim blocks will change radically!
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|