# Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.12 2000/12/25 12:56:12 eagle Exp $
+# $Id: Man.pm,v 1.15 2001/02/10 06:50:22 eagle Exp $
#
-# Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
# Perl core and too many things could munge CVS magic revision strings.
# This number should ideally be the same as the CVS revision in podlators,
# however.
-$VERSION = 1.12;
+$VERSION = 1.15;
############################################################################
}
}
+ # If $name contains spaces, quote it; this mostly comes up in the case
+ # of input from stdin.
+ $name = '"' . $name . '"' if ($name =~ /\s/);
+
# Modification date header. Try to use the modification time of our
# input.
if (!defined $$self{date}) {
local $_ = $self->parse (@_);
s/\s+$//;
s/\\s-?\d//g;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
my $self = shift;
local $_ = $self->parse (@_);
s/\s+$//;
+ s/\s*\n\s*/ /g;
if ($$self{ITEMS} > 1) {
$$self{ITEMS} = 0;
$self->output (".PD\n");
s/^\s+//;
s/\s+$//;
+ # If the argument looks like a URL, return it verbatim. This only
+ # handles URLs that use the server syntax.
+ if (m%^[a-z]+://\S+$%) { return $_ }
+
# Default to using the whole content of the link entry as a section
# name. Note that L<manpage/> forces a manpage interpretation, as does
# something looking like L<manpage(section)>. Do the same thing to