From: Jesse Vincent Date: Thu, 10 Dec 2009 16:44:26 +0000 (-0500) Subject: Updated to Pod::Simple 3.11 from CPAN [perl #71004] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a242eeb4c06c63af5ec7e01d5602b14bde94aa81;p=p5sagit%2Fp5-mst-13.2.git Updated to Pod::Simple 3.11 from CPAN [perl #71004] --- diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 20ee322..a3e5e65 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1290,7 +1290,7 @@ use File::Glob qw(:case); 'Pod::Simple' => { 'MAINTAINER' => 'arandal', - 'DISTRIBUTION' => 'ARANDAL/Pod-Simple-3.08.tar.gz', + 'DISTRIBUTION' => 'DWHEELER/Pod-Simple-3.11.tar.gz', 'FILES' => q[cpan/Pod-Simple], # XXX these two files correspond to similar ones in blead under # pod/, but the blead ones have newer changes, and also seem to diff --git a/cpan/Pod-Simple/ChangeLog b/cpan/Pod-Simple/ChangeLog index 8aa779d..b6f59e8 100644 --- a/cpan/Pod-Simple/ChangeLog +++ b/cpan/Pod-Simple/ChangeLog @@ -1,10 +1,53 @@ # ChangeLog for Pod::Simple dist #--------------------------------------------------------------------------- +2009-12-09 David E. Wheeler + * Release 3.11 + + Restored code to HTMLBatch that allows the TOC (index) to be created + in batch jobs (RT #52324 from Martin J. Evans). + + Added resources to META.yml, including bug tracker, license, and + repository. + + Turned man page links into links to man.he.net in Pod::Simple::HTML + and Pod::Simple::XHTML output. Subclass and override + resolve_man_page_link() to use a different URL. + + Added the resolve_pod_page_link() and resolve_man_page_link() methods + to Pod::Simple::XHTML to make it easier for subclasses to change the + URLs created for POD and man page links. + + Fixed the output of entities in L<> tags by Pod::Simple::XHTML. + + Fixed the output of POD links from Pod::Simple::XHTML so that the + section part (/foo) is turned into a proper fragment identfier (#foo) + in the resulting search.cpan.org link. + + Pod::Simple::Text now outputs URLs for links created in the + L format. For example, L is now + output as "Perl " rather than just as "Perl". + + Updated perlpod.pod and perlpodspec.pod to sync up with Perl core + (and to be released in Perl 5.12). Changes include: + * Removing the prohibition against L + * Deprecation of L
and L<"section"> + * Legalization of "=begin formatname parameter" + + A couple of bug fixes in Pod::Simple::HTML from Graham Barr. + + Added the do_section() method to Pod::Simple::HTML. Graham Barr. + + Word-smithed the "DESCRIPTION" a bit and wrote the README. + + Synced up all module version numbers to 3.11 except for + Pod::Simple::HTMLLegacy, which is at 5.01 and should not have its + version number lowered. + 2009-11-12 David E. Wheeler - * Release 3.10 + * Release 3.11 - Converted test files that had DOS enedings to have Unix endings + Converted test files that had DOS endings to have Unix endings (RT #50922 from Steve Hay). Skip tests on VMS where the lack of filename case preservation can diff --git a/cpan/Pod-Simple/README b/cpan/Pod-Simple/README index 3be9a63..00f0c12 100644 --- a/cpan/Pod-Simple/README +++ b/cpan/Pod-Simple/README @@ -1,7 +1,61 @@ - Time-stamp: "2003-09-01 23:10:23 ADT" +=head1 Pod::Simple version 3.11 -This is a late-beta release of Pod::Simple, the module-suite for -parsing Pod. +Pod::Simple is a Perl library for parsing text in the Pod ("plain old +documentation") markup language that is typically used for writing +documentation for Perl and for Perl modules. The Pod format is explained +L; the most common formatter is called C. -There are still some gaps in the documentation, and Pod::Simple::HTML -isn't yet all that it should be. +Pod formatters can use Pod::Simple to parse Pod documents and render them into +plain text, HTML, or any number of other formats. + +=head2 Installation + +To install this module, type the following: + + perl Makefile.PL + make + make test + make install + +=head2 Support + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + +=head1 copyright and Disclaimers + +Copyright (c) 2002 Sean M. Burke. All rights reserved. + +This library is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +This program is distributed in the hope that it will be useful, but +without any warranty; without even the implied warranty of +merchantability or fitness for a particular purpose. + +=head1 Author + +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. + +Pod::Simple is maintained by: + +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pm b/cpan/Pod-Simple/lib/Pod/Simple.pm index ae4aaff..554eb81 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple.pm @@ -18,7 +18,7 @@ use vars qw( ); @ISA = ('Pod::Simple::BlackBox'); -$VERSION = '3.10'; +$VERSION = '3.11'; @Known_formatting_codes = qw(I B C L E F S X Z); %Known_formatting_codes = map(($_=>1), @Known_formatting_codes); @@ -984,7 +984,7 @@ sub _treat_Ls { # Process our dear dear friends, the L<...> sequences # L or L # L or L or L # L - # Ltext|scheme:...> + # L my($self,@stack) = @_; diff --git a/cpan/Pod-Simple/lib/Pod/Simple.pod b/cpan/Pod-Simple/lib/Pod/Simple.pod index b9e13a6..294fdba 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple.pod +++ b/cpan/Pod-Simple/lib/Pod/Simple.pod @@ -12,29 +12,24 @@ Pod::Simple - framework for parsing Pod Pod::Simple is a Perl library for parsing text in the Pod ("plain old documentation") markup language that is typically used for writing documentation for Perl and for Perl modules. The Pod format is explained -in the L man page; the most common formatter is called -"perldoc". +L; the most common formatter is called C. -Pod formatters can use Pod::Simple to parse Pod documents into produce -renderings of them in plain ASCII, in HTML, or in any number of other -formats. Typically, such formatters will be subclasses of Pod::Simple, -and so they will inherit its methods, like C. +Pod formatters can use Pod::Simple to parse Pod documents and render them into +plain text, HTML, or any number of other formats. Typically, such formatters +will be subclasses of Pod::Simple, and so they will inherit its methods, like +C. If you're reading this document just because you have a Pod-processing -subclass that you want to use, this document (plus the documentation for -the subclass) is probably all you'll need to read. +subclass that you want to use, this document (plus the documentation for the +subclass) is probably all you need to read. If you're reading this document because you want to write a formatter -subclass, continue reading this document, and then read -L, and then possibly even read L -(some of which is for parser-writers, but much of which is notes to -formatter-writers). - +subclass, continue reading it and then read L, and +then possibly even read L (some of which is for parser-writers, +but much of which is notes to formatter-writers). =head1 MAIN METHODS - - =over =item C<< $parser = I->new(); >> @@ -235,6 +230,18 @@ L L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS @@ -249,9 +256,10 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Original author: Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -Maintained by: +Pod::Simple is maintained by: =over @@ -259,8 +267,8 @@ Maintained by: =item * Hans Dieter Pearcey C +=item * David E. Wheeler C + =back =cut - - diff --git a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm index 65438df..37094ad 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm @@ -22,6 +22,8 @@ package Pod::Simple::BlackBox; use integer; # vroom! use strict; use Carp (); +use vars qw($VERSION ); +$VERSION = '3.11'; #use constant DEBUG => 7; BEGIN { require Pod::Simple; diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm index 0d01f50..cfaa2a8 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Checker.pm @@ -9,7 +9,7 @@ use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); use vars qw( @ISA $VERSION ); -$VERSION = '2.02'; +$VERSION = '3.11'; @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG @@ -152,6 +152,19 @@ This is a subclass of L and inherits all its methods. L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -165,7 +178,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm index 7747f0b..b4e4a6c 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Debug.pm @@ -2,6 +2,8 @@ require 5; package Pod::Simple::Debug; use strict; +use vars qw($VERSION ); +$VERSION = '3.11'; sub import { my($value,$variable); @@ -132,6 +134,19 @@ L The article "Constants in Perl", in I issue 21. See L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -145,7 +160,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm index e678e42..fd38945 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsText.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::DumpAsText; -$VERSION = '2.02'; +$VERSION = '3.11'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} @@ -111,6 +111,19 @@ L L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -124,7 +137,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm index fe0c166..792b688 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::DumpAsXML; -$VERSION = '2.02'; +$VERSION = '3.11'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} @@ -126,6 +126,18 @@ L, L The older libraries L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS @@ -140,7 +152,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm index 44c5555..681cc4d 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/HTML.pm @@ -5,12 +5,12 @@ use strict; use Pod::Simple::PullParser (); use vars qw( @ISA %Tagmap $Computerese $LamePad $Linearization_Limit $VERSION - $Perldoc_URL_Prefix $Perldoc_URL_Postfix + $Perldoc_URL_Prefix $Perldoc_URL_Postfix $Man_URL_Prefix $Man_URL_Postfix $Title_Prefix $Title_Postfix $HTML_EXTENSION %ToIndex $Doctype_decl $Content_decl ); @ISA = ('Pod::Simple::PullParser'); -$VERSION = '3.03'; +$VERSION = '3.11'; use UNIVERSAL (); BEGIN { @@ -37,6 +37,10 @@ $Perldoc_URL_Prefix = 'http://search.cpan.org/perldoc?' $Perldoc_URL_Postfix = '' unless defined $Perldoc_URL_Postfix; + +$Man_URL_Prefix = 'http://man.he.net/man'; +$Man_URL_Postfix = ''; + $Title_Prefix = '' unless defined $Title_Prefix; $Title_Postfix = '' unless defined $Title_Postfix; %ToIndex = map {; $_ => 1 } qw(head1 head2 head3 head4 ); # item-text @@ -52,6 +56,12 @@ __PACKAGE__->_accessorize( 'perldoc_url_postfix', # what to put after "Foo%3a%3aBar" in the URL. Normally "". + 'man_url_prefix', + # In turning L into http://whatever/man/1/crontab, what + # to put before the "1/crontab". + 'man_url_postfix', + # what to put after the "1/crontab" in the URL. Normally "". + 'batch_mode', # whether we're in batch mode 'batch_mode_current_level', # When in batch mode, how deep the current module is: 1 for "LWP", @@ -180,6 +190,8 @@ sub new { $new->perldoc_url_prefix( $Perldoc_URL_Prefix ); $new->perldoc_url_postfix( $Perldoc_URL_Postfix ); + $new->man_url_prefix( $Man_URL_Prefix ); + $new->man_url_postfix( $Man_URL_Postfix ); $new->title_prefix( $Title_Prefix ); $new->title_postfix( $Title_Postfix ); @@ -408,7 +420,7 @@ sub index_as_html { $indent = ' ' x $level; push @out, sprintf "%s
  • %s", - $indent, $level, $anchorname, esc($text) + $indent, $level, esc($anchorname), esc($text) ; } push @out, "\n"; @@ -457,7 +469,8 @@ sub _do_middle_main_loop { } my $name = $self->linearize_tokens(@to_unget); - + $name = $self->do_section($name, $token) if defined $name; + print $fh "text, "\n"; - printf $fh "\n" . $next->text . "\n"; + print $fh "\n" . $next->text . "\n"; next; } else { @@ -536,6 +549,11 @@ sub _do_middle_main_loop { ########################################################################### # +sub do_section { + my($self, $name, $token) = @_; + return $name; +} + sub do_link { my($self, $token) = @_; my $type = $token->attr('type'); @@ -554,9 +572,20 @@ sub do_link { sub do_url_link { return $_[1]->attr('to') } -sub do_man_link { return undef } - # But subclasses are welcome to override this if they have man - # pages somewhere URL-accessible. +sub do_man_link { + my ($self, $link) = @_; + my $to = $link->attr('to'); + my $frag = $link->attr('section'); + + return undef unless defined $to and length $to; # should never happen + + $frag = $self->section_escape($frag) + if defined $frag and length($frag .= ''); # (stringify) + + DEBUG and print "Resolving \"$to/$frag\"\n\n"; + + return $self->resolve_man_page_link($to, $frag); +} sub do_pod_link { @@ -646,6 +675,7 @@ sub section_name_tidy { sub section_url_escape { shift->general_url_escape(@_) } sub pagepath_url_escape { shift->general_url_escape(@_) } +sub manpage_url_escape { shift->general_url_escape(@_) } sub general_url_escape { my($self, $string) = @_; @@ -719,6 +749,18 @@ sub batch_mode_rectify_path { return; } +sub resolve_man_page_link { + my ($self, $to, $frag) = @_; + my ($page, $section) = $to =~ /^([^(]+)(?:[(](\d+)[)])?$/; + + return undef unless defined $page and length $page; + $section ||= 1; + + return $self->man_url_prefix . "$section/" + . $self->manpage_url_escape($page) + . $self->man_url_postfix; +} + #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub resolve_pod_link_by_table { @@ -858,17 +900,25 @@ maybe override do_pod_link maybe override do_beginning do_end - - =head1 SEE ALSO L, L - TODO: a corpus of sample Pod input and HTML output? Or common idioms? +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS @@ -883,7 +933,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm index 96093fb..773c8dc 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/HTMLBatch.pm @@ -5,7 +5,7 @@ use strict; use vars qw( $VERSION $HTML_RENDER_CLASS $HTML_EXTENSION $CSS $JAVASCRIPT $SLEEPY $SEARCH_CLASS @ISA ); -$VERSION = '3.02'; +$VERSION = '3.11'; @ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML! # TODO: nocontents stylesheets. Strike some of the color variations? @@ -250,6 +250,9 @@ sub _do_one_batch_conversion { # Give each class a chance to init the converter: $page->batch_mode_page_object_init($self, $module, $infile, $outfile, $depth) if $page->can('batch_mode_page_object_init'); + # Init for the index (TOC), too. + $self->batch_mode_page_object_init($page, $module, $infile, $outfile, $depth) + if $self->can('batch_mode_page_object_init'); # Now get busy... $self->makepath($outdir => \@namelets); @@ -1325,12 +1328,22 @@ you're looking for. L, L, L, L +=head1 SUPPORT +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS -Copyright (c) 2004 Sean M. Burke. All rights reserved. +Copyright (c) 2002 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -1341,9 +1354,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C +=item * Hans Dieter Pearcey C +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm index 14c3ba8..9a8f902 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/LinkSection.pm @@ -2,9 +2,13 @@ require 5; package Pod::Simple::LinkSection; # Based somewhat dimly on Array::Autojoin +use vars qw($VERSION ); +$VERSION = '3.11'; use strict; use Pod::Simple::BlackBox; +use vars qw($VERSION ); +$VERSION = '3.11'; use overload( # So it'll stringify nice '""' => \&Pod::Simple::BlackBox::stringify_lol, @@ -126,9 +130,22 @@ Output: L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS -Copyright (c) 2002 Sean M. Burke. All rights reserved. +Copyright (c) 2004 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -139,7 +156,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm b/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm index 2ad607e..40e2352 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Methody.pm @@ -4,7 +4,7 @@ package Pod::Simple::Methody; use strict; use Pod::Simple (); use vars qw(@ISA $VERSION); -$VERSION = '2.02'; +$VERSION = '3.11'; @ISA = ('Pod::Simple'); # Yes, we could use named variables, but I want this to be impose @@ -108,6 +108,19 @@ See the source for Pod::Simple::Text for an example of using this class. L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -121,7 +134,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm index bc42a95..8b65f79 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Progress.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::Progress; -$VERSION = "1.01"; +$VERSION = '3.11'; use strict; # Objects of this class are used for noting progress of an diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm index 1a6a471..f6ae766 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParser.pm @@ -1,7 +1,7 @@ require 5; package Pod::Simple::PullParser; -$VERSION = '2.02'; +$VERSION = '3.11'; use Pod::Simple (); BEGIN {@ISA = ('Pod::Simple')} @@ -728,6 +728,19 @@ L. L, which inspired this. +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -741,12 +754,22 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: +=over +=item * Allison Randal C +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut JUNK: sub _old_get_title { # some witchery in here diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm index 7b219f8..f4e23a4 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserEndToken.pm @@ -2,8 +2,10 @@ require 5; package Pod::Simple::PullParserEndToken; use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); use strict; +use vars qw(@ISA $VERSION); +@ISA = ('Pod::Simple::PullParserToken'); +$VERSION = '3.11'; sub new { # Class->new(tagname); my $class = shift; @@ -74,6 +76,19 @@ Pod::Simple::PullParserEndToken->new( I ) L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -87,7 +102,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm index 9ead50d..37b6821 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserStartToken.pm @@ -2,8 +2,10 @@ require 5; package Pod::Simple::PullParserStartToken; use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); use strict; +use vars qw(@ISA $VERSION); +@ISA = ('Pod::Simple::PullParserToken'); +$VERSION = '3.11'; sub new { # Class->new(tagname, optional_attrhash); my $class = shift; @@ -111,6 +113,23 @@ Pod::Simple::PullParserStartToken->new( I, I ) L, L, L +=head1 SEE ALSO + +L, L, L + +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -124,7 +143,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm index 2d1a1d7..ccd03df 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserTextToken.pm @@ -2,8 +2,10 @@ require 5; package Pod::Simple::PullParserTextToken; use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); use strict; +use vars qw(@ISA $VERSION); +@ISA = ('Pod::Simple::PullParserToken'); +$VERSION = '3.11'; sub new { # Class->new(text); my $class = shift; @@ -82,6 +84,19 @@ Pod::Simple::PullParserTextToken->new( I ) L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -95,7 +110,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm b/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm index 9ec3659..ff8ccc1 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/PullParserToken.pm @@ -3,7 +3,7 @@ require 5; package Pod::Simple::PullParserToken; # Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token @ISA = (); -$VERSION = '2.02'; +$VERSION = '3.11'; use strict; sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway @@ -119,6 +119,19 @@ L. L and L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -132,7 +145,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm b/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm index de2a7b3..33daf15 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/RTF.pm @@ -8,7 +8,7 @@ package Pod::Simple::RTF; use strict; use vars qw($VERSION @ISA %Escape $WRAP %Tagmap); -$VERSION = '2.02'; +$VERSION = '3.11'; use Pod::Simple::PullParser (); BEGIN {@ISA = ('Pod::Simple::PullParser')} @@ -655,6 +655,19 @@ even more, see the source and/or write to me. L, L, L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -668,7 +681,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm index 980b3b7..3796434 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Search.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Search.pm @@ -4,7 +4,7 @@ package Pod::Simple::Search; use strict; use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY); -$VERSION = 3.04; ## Current version of this package +$VERSION = '3.11'; ## Current version of this package BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level use Carp (); @@ -996,21 +996,48 @@ with default attribute values is used. Returns true if the supplied filename (not POD module) contains some Pod documentation. +=head1 SUPPORT +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + +=head1 COPYRIGHT AND DISCLAIMERS + +Copyright (c) 2002 Sean M. Burke. All rights reserved. + +This library is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +This program is distributed in the hope that it will be useful, but +without any warranty; without even the implied warranty of +merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke Esburke@cpan.orgE -borrowed code from -Marek Rouchal's Pod::Find, which in turn -heavily borrowed code from Nick Ing-Simmons' PodToHtml. +Pod::Simple was created by Sean M. Burke with code borrowed +from Marek Rouchal's L, which in turn heavily borrowed code from +Nick Ing-Simmons' C. -Tim Jenness Et.jenness@jach.hawaii.eduE provided -C and C to Pod::Find. +But don't bother him, he's retired. -=head1 SEE ALSO +Pod::Simple is maintained by: -L, L +=over -=cut +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm index 64dd155..ca9c7fb 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/SimpleTree.pm @@ -6,7 +6,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '2.02'; +$VERSION = '3.11'; BEGIN { @ISA = ('Pod::Simple'); *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; @@ -136,6 +136,19 @@ L L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -149,7 +162,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod index d4ee694..d15f308 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod +++ b/cpan/Pod-Simple/lib/Pod/Simple/Subclassing.pod @@ -893,6 +893,18 @@ L L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS @@ -907,8 +919,20 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. + +Pod::Simple is maintained by: + +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C +=item * David E. Wheeler C + +=back =for notes Hm, my old podchecker version (1.2) says: diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm index df82c07..1713f04 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Text.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Text.pm @@ -6,7 +6,7 @@ use Carp (); use Pod::Simple::Methody (); use Pod::Simple (); use vars qw( @ISA $VERSION $FREAKYMODE); -$VERSION = '2.02'; +$VERSION = '3.11'; @ISA = ('Pod::Simple::Methody'); BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG @@ -66,6 +66,14 @@ sub end_Para { $_[0]->emit_par( 0) } sub end_item_bullet { $_[0]->emit_par( 0) } sub end_item_number { $_[0]->emit_par( 0) } sub end_item_text { $_[0]->emit_par(-2) } +sub start_L { $_[0]{'Link'} = $_[1] if $_[1]->{type} eq 'url' } +sub end_L { + if (my $link = delete $_[0]{'Link'}) { + # Append the URL to the output unless it's already present. + $_[0]{'Thispara'} .= " <$link->{to}>" + unless $_[0]{'Thispara'} =~ /\b\E$link->{to}/; + } +} sub emit_par { my($self, $tweak_indent) = splice(@_,0,2); @@ -133,6 +141,19 @@ This is a subclass of L and inherits all its methods. L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -146,7 +167,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm index 3675b00..d920d53 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TextContent.pm @@ -6,7 +6,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( @ISA $VERSION ); -$VERSION = '2.02'; +$VERSION = '3.11'; @ISA = ('Pod::Simple'); sub new { @@ -68,6 +68,19 @@ This is a subclass of L and inherits all its methods. L, L, L +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + =head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2002 Sean M. Burke. All rights reserved. @@ -81,7 +94,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: + +=over +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm index b031fe5..9003d43 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TiedOutFH.pm @@ -3,6 +3,8 @@ use strict; package Pod::Simple::TiedOutFH; use Symbol ('gensym'); use Carp (); +use vars qw($VERSION ); +$VERSION = '3.11'; #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm index 434f963..28ab27f 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/Transcode.pm @@ -1,6 +1,8 @@ require 5; package Pod::Simple::Transcode; +use vars qw($VERSION ); +$VERSION = '3.11'; BEGIN { if(defined &DEBUG) {;} # Okay diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm index d5eb7e5..bf2fd27 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeDumb.pm @@ -5,7 +5,7 @@ require 5; package Pod::Simple::TranscodeDumb; use strict; use vars qw($VERSION %Supported); -$VERSION = '2.02'; +$VERSION = '3.11'; # This module basically pretends it knows how to transcode, except # only for null-transcodings! We use this when Encode isn't # available. diff --git a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm index 3fc26a4..20c7588 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/TranscodeSmart.pm @@ -8,6 +8,8 @@ package Pod::Simple::TranscodeSmart; use strict; use Pod::Simple; require Encode; +use vars qw($VERSION ); +$VERSION = '3.11'; sub is_dumb {0} sub is_smart {1} diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm index e4d6634..c371db9 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/XHTML.pm @@ -28,7 +28,7 @@ L, but it largely preserves the same interface. package Pod::Simple::XHTML; use strict; use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES ); -$VERSION = '3.10'; +$VERSION = '3.11'; use Carp (); use Pod::Simple::Methody (); @ISA = ('Pod::Simple::Methody'); @@ -76,6 +76,16 @@ to put before the "Foo%3a%3aBar". The default value is What to put after "Foo%3a%3aBar" in the URL. This option is not set by default. +=head2 man_url_prefix + +In turning C<< L >> into http://whatever/man/1/crontab, what +to put before the "1/crontab". The default value is +"http://man.he.net/man". + +=head2 man_url_postfix + +What to put after "1/crontab" in the URL. This option is not set by default. + =head2 title_prefix, title_postfix What to put before and after the title in the head. The values should @@ -146,6 +156,8 @@ index for the sake of tradition). __PACKAGE__->_accessorize( 'perldoc_url_prefix', 'perldoc_url_postfix', + 'man_url_prefix', + 'man_url_postfix', 'title_prefix', 'title_postfix', 'html_css', 'html_javascript', @@ -179,6 +191,7 @@ sub new { $new->{'output_fh'} ||= *STDOUT{IO}; $new->accept_targets( 'html', 'HTML' ); $new->perldoc_url_prefix('http://search.cpan.org/perldoc?'); + $new->man_url_prefix('http://man.he.net/man'); $new->html_header_tags(''); $new->nix_X_codes(1); $new->codes_in_verbatim(1); @@ -433,53 +446,24 @@ sub end_B { $_[0]{'scratch'} .= '' } sub start_C { $_[0]{'scratch'} .= '' } sub end_C { $_[0]{'scratch'} .= '' } -sub start_E { - my ($self, $flags) = @_; - push @{ $self->{'saved'} }, $self->{'scratch'}; - $self->{'scratch'} = ''; -} -sub end_E { - my ($self, $flags) = @_; - my $previous = pop @{ $self->{'saved'} }; - my $entity = $self->{'scratch'}; - - if ($entity =~ 'sol' or $entity =~ 'verbar') { - my $char = Pod::Escapes::e2char($entity); - if (defined($char)) { - $self->{'scratch'} = $previous . $char; - return; - } - } - - if ($entity =~ /^[0-9]/) { - $entity = '#' . $entity; - } - - $self->{'scratch'} = $previous . '&'. $entity . ';' -} - sub start_F { $_[0]{'scratch'} .= '' } sub end_F { $_[0]{'scratch'} .= '' } sub start_I { $_[0]{'scratch'} .= '' } sub end_I { $_[0]{'scratch'} .= '' } -sub start_L { +sub start_L { my ($self, $flags) = @_; - my $url; - if ($flags->{'type'} eq 'url') { - $url = $flags->{'to'}; - } elsif ($flags->{'type'} eq 'pod') { - $url .= $self->perldoc_url_prefix || ''; - $url .= $flags->{'to'} || ''; - $url .= '/' . $flags->{'section'} if ($flags->{'section'}); - $url .= $self->perldoc_url_postfix || ''; -# require Data::Dumper; -# print STDERR Data::Dumper->Dump([$flags]); - } - - $self->{'scratch'} .= ''; + my ($type, $to, $section) = @{$flags}{'type', 'to', 'section'}; + my $url = $type eq 'url' ? $to + : $type eq 'pod' ? $self->resolve_pod_page_link($to, $section) + : $type eq 'man' ? $self->resolve_man_page_link($to, $section) + : undef; + + # If it's an unknown type, use an attribute-less like HTML.pm. + $self->{'scratch'} .= '' : '>'); } + sub end_L { $_[0]{'scratch'} .= '' } sub start_S { $_[0]{'scratch'} .= '' } @@ -496,6 +480,69 @@ sub emit { return; } +=head2 resolve_pod_page_link + + my $url = $pod->resolve_pod_page_link('Net::Ping', 'INSTALL'); + my $url = $pod->resolve_pod_page_link('perlpodspec'); + my $url = $pod->resolve_pod_page_link(undef, 'SYNOPSIS'); + +Resolves a POD link target (typically a module or POD file name) and section +name to a URL. The resulting link will be returned for the above examples as: + + http://search.cpan.org/perldoc?Net::Ping#INSTALL + http://search.cpan.org/perldoc?perlpodspec + #SYNOPSIS + +Note that when there is only a section argument the URL will simply be a link +to a section in the current document. + +=cut + +sub resolve_pod_page_link { + my ($self, $to, $section) = @_; + return undef unless defined $to || defined $section; + if (defined $section) { + $section = '#' . $self->idify($section, 1); + return $section unless defined $to; + } else { + $section = '' + } + + return ($self->perldoc_url_prefix || '') + . encode_entities($to) . $section + . ($self->perldoc_url_postfix || ''); +} + +=head2 resolve_man_page_link + + my $url = $pod->resolve_man_page_link('crontab(5)', 'EXAMPLE CRON FILE'); + my $url = $pod->resolve_man_page_link('crontab'); + +Resolves a man page link target and numeric section to a URL. The resulting +link will be returned for the above examples as: + + http://man.he.net/man5/crontab + http://man.he.net/man1/crontab + +Note that the first argument is required. The section number will be parsed +from it, and if it's missing will default to 1. The second argument is +currently ignored, as L does not currently +include linkable IDs or anchor names in its pages. Subclass to link to a +different man page HTTP server. + +=cut + +sub resolve_man_page_link { + my ($self, $to, $section) = @_; + return undef unless defined $to; + my ($page, $part) = $to =~ /^([^(]+)(?:[(](\d+)[)])?$/; + return undef unless $page; + return ($self->man_url_prefix || '') + . ($part || 1) . "/" . encode_entities($page) + . ($self->man_url_postfix || ''); + +} + =head2 idify my $id = $pod->idify($text); @@ -545,9 +592,6 @@ sub idify { return "$t$i"; } -# Bypass built-in E<> handling to preserve entity encoding -sub _treat_Es {} - 1; __END__ @@ -556,20 +600,51 @@ __END__ L, L -=head1 COPYRIGHT +=head1 SEE ALSO + +L, L, L + +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. + +=head1 COPYRIGHT AND DISCLAIMERS Copyright (c) 2003-2005 Allison Randal. -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +This library is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. -This library is distributed in the hope that it will be useful, but +This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =head1 AUTHOR -Allison Randal +Pod::Simpele::XHTML was created by Allison Randal . -=cut +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. + +Pod::Simple is maintained by: + +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C +=back + +=cut diff --git a/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm b/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm index 1e7ec15..e81f9a8 100644 --- a/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm +++ b/cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm @@ -5,7 +5,7 @@ use strict; use Carp (); use Pod::Simple (); use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '2.02'; +$VERSION = '3.11'; BEGIN { @ISA = ('Pod::Simple'); *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; @@ -137,10 +137,26 @@ options in this module (and the dozen modules it depends on) are undocumented; but one of those undocumented bits might be just what you're looking for. +=head1 SEE ALSO + +L, L, L + +=head1 SUPPORT + +Questions or discussion about POD and Pod::Simple should be sent to the +pod-people@perl.org mail list. Send an empty email to +pod-people-subscribe@perl.org to subscribe. + +This module is managed in an open GitHub repository, +L. Feel free to fork and contribute, or +to clone L and send patches! + +Patches against Pod::Simple are welcome. Please send bug reports to +. =head1 COPYRIGHT AND DISCLAIMERS -Copyright (c) 2002-4 Sean M. Burke. All rights reserved. +Copyright (c) 2002-2004 Sean M. Burke. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -151,7 +167,19 @@ merchantability or fitness for a particular purpose. =head1 AUTHOR -Sean M. Burke C +Pod::Simple was created by Sean M. Burke . +But don't bother him, he's retired. -=cut +Pod::Simple is maintained by: +=over + +=item * Allison Randal C + +=item * Hans Dieter Pearcey C + +=item * David E. Wheeler C + +=back + +=cut diff --git a/cpan/Pod-Simple/t/fcodes_s.t b/cpan/Pod-Simple/t/fcodes_s.t index 0c66d2c..cada7e4 100644 --- a/cpan/Pod-Simple/t/fcodes_s.t +++ b/cpan/Pod-Simple/t/fcodes_s.t @@ -8,7 +8,7 @@ BEGIN { use strict; use Test; -BEGIN { plan tests => 14 }; +BEGIN { plan tests => 80 }; #use Pod::Simple::Debug (6); @@ -102,6 +102,362 @@ Do they always lose the rest of the line? END ); +$x = 'Pod::Simple::Text'; +# Test text output of links. +ok( + $x->_out(qq{=pod\n\nL\n}), + " Net::Ping\n\n" +); + +ok( + $x->_out(qq{=pod\n\nBe sure to read the L docs\n}), + " Be sure to read the Net::Ping docs\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " http://www.perl.com\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " crontab(5)\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + qq{ "Ping-pong" in Net::Ping\n\n} +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + qq{ "Object Methods"\n\n} +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + qq{ "Object Methods"\n\n} +); + +ok( + $x->_out(qq{=pod\n\nL<"Object Methods">\n}), + qq{ "Object Methods"\n\n} +); + +ok( + $x->_out(qq{=pod\n\nLong>\n}), + qq{ "Ping-pong" in Net::Ping\n\n} +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " news:comp.lang.perl.misc\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " http://www.perl.org\n\n" +); + +ok( + $x->_out(qq{=pod\n\nSee L\n}), + " See http://www.perl.org\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " http://www.perl.org/CPAN/authors/id/S/SB/SBURKE/\n\n" +); + +ok( + $x->_out(qq{=pod\n\nLlang.perl.misc>\n}), + " news:comp.lang.perl.misc\n\n" +); + +ok( + $x->_out(qq{=pod\n\nLperl.org>\n}), + " http://www.perl.org\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " things\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " things\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " Perl Error Messages\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " Perl Error Messages\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " Perl Error Messages\n\n" +); + +ok( + $x->_out(qq{=pod\n\nL\n}), + " perl.org \n\n" +); + +ok( + $x->_out(qq{=pod\n\nSee L\n}), + " See perl.org \n\n" +); + + +# Test HTML output of links. +use Pod::Simple::HTML; +my $PERLDOC = "http://search.cpan.org/perldoc"; +my $MANURL = "http://man.he.net/man"; +sub x ($) { + Pod::Simple::HTML->_out( + sub { $_[0]->bare_output(1) }, + "=pod\n\n$_[0]", + ) +} + +ok( + x(qq{L\n}), + qq{\n

    Net::Ping

    \n} +); + +ok( + x(qq{Be sure to read the L docs\n}), + qq{\n

    Be sure to read the Net::Ping docs

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    http://www.perl.com

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    crontab(5)

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    "Ping-pong" in Net::Ping

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    "Object Methods"

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    "Object Methods"

    \n} +); + +ok( + x(qq{L<"Object Methods">\n}), + qq{\n

    "Object Methods"

    \n} +); + +ok( + x(qq{Long>\n}), + qq{\n

    "Ping-pong" in Net::Ping

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    news:comp.lang.perl.misc

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    http://www.perl.org

    \n} +); + +ok( + x(qq{See L\n}), + qq{\n

    See http://www.perl.org

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    http://www.perl.org/CPAN/authors/id/S/SB/SBURKE/

    \n} +); + +ok( + x(qq{Llang.perl.misc>\n}), + qq{\n

    news:comp.lang.perl.misc

    \n} +); + +ok( + x(qq{Lperl.org>\n}), + qq{\n

    http://www.perl.org

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    things

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    things

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    Perl Error Messages

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    Perl Error Messages

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    Perl Error Messages

    \n} +); + +ok( + x(qq{L\n}), + qq{\n

    perl.org

    \n} +); + +ok( + x(qq{See L\n}), + qq{\n

    See perl.org

    \n} +); + +# Test link output in XHTML. +use Pod::Simple::XHTML; +sub o ($) { + my $p = Pod::Simple::XHTML->new; + $p->html_header(""); + $p->html_footer(""); + my $results = ''; + $p->output_string( \$results ); # Send the resulting output to a string + $p->parse_string_document("=pod\n\n$_[0]"); + return $results; +} + +ok( + o(qq{L}), + qq{

    Net::Ping

    \n\n} +); + +ok( + o(qq{Be sure to read the L docs}), + qq{

    Be sure to read the Net::Ping docs

    \n\n} +); + +ok( + o(qq{L}), + qq{

    http://www.perl.com

    \n\n} +); + +ok( + o(qq{L}), + qq{

    crontab(5)

    \n\n} +); + +ok( + o(qq{L}), + qq{

    "Ping-pong" in Net::Ping

    \n\n} +); + +ok( + o(qq{L}), + qq{

    "Object Methods"

    \n\n} +); + +ok( + o(qq{L}), + qq{

    "Object Methods"

    \n\n} +); + +ok( + o(qq{L<"Object Methods">}), + qq{

    "Object Methods"

    \n\n} +); + +ok( + o(qq{Long>}), + qq{

    "Ping-pong" in Net::Ping

    \n\n} +); + +ok( + o(qq{L}), + qq{

    news:comp.lang.perl.misc

    \n\n} +); + +ok( + o(qq{L}), + qq{

    http://www.perl.org

    \n\n} +); + +ok( + o(qq{See L}), + qq{

    See http://www.perl.org

    \n\n} +); + +ok( + o(qq{L}), + qq{

    http://www.perl.org/CPAN/authors/id/S/SB/SBURKE/

    \n\n} +); + +ok( + o(qq{Llang.perl.misc>}), + qq{

    news:comp.lang.perl.misc

    \n\n} +); + +ok( + o(qq{Lperl.org>}), + qq{

    http://www.perl.org

    \n\n} +); + +ok( + o(qq{L}), + qq{

    things

    \n\n} +); + +ok( + o(qq{L}), + qq{

    things

    \n\n} +); + +ok( + o(qq{L}), + qq{

    Perl Error Messages

    \n\n} +); + +ok( + o(qq{L}), + qq{

    Perl Error Messages

    \n\n} +); + +ok( + o(qq{L}), + qq{

    Perl Error Messages

    \n\n} +); + +ok( + o(qq{L}), + qq{

    perl.org

    \n\n} +); + +ok( + o(qq{See L}), + qq{

    See perl.org

    \n\n} +); + print "# Wrapping up... one for the road...\n"; ok 1; print "# --- Done with ", __FILE__, " --- \n"; diff --git a/cpan/Pod-Simple/t/html01.t b/cpan/Pod-Simple/t/html01.t index 18e84a8..86e84ee 100644 --- a/cpan/Pod-Simple/t/html01.t +++ b/cpan/Pod-Simple/t/html01.t @@ -9,7 +9,7 @@ BEGIN { use strict; use Test; -BEGIN { plan tests => 9 }; +BEGIN { plan tests => 10 }; #use Pod::Simple::Debug (10); @@ -71,7 +71,6 @@ ok(x( "heading building" ); -print x("=over 4\n\n=item one\n\n=item two\n\nHello\n\n=back\n"); ok( x("=over 4\n\n=item one\n\n=item two\n\nHello\n\n=back\n"), q{ @@ -90,6 +89,22 @@ ok( } ); +# Check subclass. +SUBCLASS: { + package My::Pod::HTML; + use vars '@ISA', '$VERSION'; + @ISA = ('Pod::Simple::HTML'); + $VERSION = '0.01'; + sub do_section { 'howdy' } +} + +ok( + My::Pod::HTML->_out( + sub{ $_[0]->bare_output(1) }, + "=pod\n\n=over\n\n=item Foo\n\n", + ), + "\n
    \n
    Foo
    \n
    \n", +); print "# And one for the road...\n"; ok 1; diff --git a/cpan/Pod-Simple/t/htmlbat.t b/cpan/Pod-Simple/t/htmlbat.t index 559754b..ca58e6e 100644 --- a/cpan/Pod-Simple/t/htmlbat.t +++ b/cpan/Pod-Simple/t/htmlbat.t @@ -13,7 +13,7 @@ my $DEBUG = 0; #sub Pod::Simple::HTMLBatch::DEBUG () {5}; use Test; -BEGIN { plan tests => 9 } +BEGIN { plan tests => 17 } require Pod::Simple::HTMLBatch;; @@ -62,13 +62,24 @@ mkdir $outdir, 0777 or die "Can't mkdir $outdir: $!"; print "# Converting $corpus_dir => $outdir\n" if $DEBUG; my $conv = Pod::Simple::HTMLBatch->new; $conv->verbose(0); +$conv->index(1); $conv->batch_convert( [$corpus_dir], $outdir ); ok 1; print "# OK, back from converting.\n" if $DEBUG; my @files; use File::Find; -find( sub { push @files, $File::Find::name; return }, $outdir ); +find( sub { + push @files, $File::Find::name; + if (/[.]html$/ && $_ !~ /perl|index/) { + # Make sure an index was generated. + open HTML, $_ or die "Cannot open $_: $!\n"; + my $html = do { local $/; }; + close HTML; + ok $html =~ /
    /; + } + return; +}, $outdir ); { my $long = ( grep m/zikzik\./i, @files )[0]; @@ -101,8 +112,6 @@ if (my @long = grep { /^[^.]{9,}/ } map { s{^[^/]/}{} } @files) { ok 1; } - - # use Pod::Simple; # *pretty = \&Pod::Simple::BlackBox::pretty; diff --git a/cpan/Pod-Simple/t/items02.t b/cpan/Pod-Simple/t/items02.t index 4898fe4..3119682 100644 --- a/cpan/Pod-Simple/t/items02.t +++ b/cpan/Pod-Simple/t/items02.t @@ -41,4 +41,3 @@ ok( $x->_out("\n=over\n\n=item 5.\n\nStuff\n\n=cut\n\nCrunk\nZorp\n\n=item 4.\n\ print "# Wrapping up... one for the road...\n"; ok 1; print "# --- Done with ", __FILE__, " --- \n"; - diff --git a/cpan/Pod-Simple/t/xhtml01.t b/cpan/Pod-Simple/t/xhtml01.t index 8517dda..e0993a5 100644 --- a/cpan/Pod-Simple/t/xhtml01.t +++ b/cpan/Pod-Simple/t/xhtml01.t @@ -8,7 +8,8 @@ BEGIN { use strict; use lib '../lib'; -use Test::More tests => 35; +use Test::More tests => 43; +#use Test::More 'no_plan'; use_ok('Pod::Simple::XHTML') or exit; @@ -17,7 +18,8 @@ isa_ok ($parser, 'Pod::Simple::XHTML'); my $results; -my $PERLDOC = "http://search.cpan.org/perldoc?"; +my $PERLDOC = "http://search.cpan.org/perldoc"; +my $MANURL = "http://man.he.net/man"; initialize($parser, $results); $parser->parse_string_document( "=head1 Poit!" ); @@ -403,7 +405,7 @@ $parser->parse_string_document(<<'EOPOD'); A plain paragraph with a L. EOPOD is($results, <<"EOHTML", "Link entity in a paragraph"); -

    A plain paragraph with a Newlines.

    +

    A plain paragraph with a Newlines.

    EOHTML @@ -414,7 +416,7 @@ $parser->parse_string_document(<<'EOPOD'); A plain paragraph with a L. EOPOD is($results, <<"EOHTML", "Link entity in a paragraph"); -

    A plain paragraph with a "Newlines" in perlport.

    +

    A plain paragraph with a "Newlines" in perlport.

    EOHTML @@ -507,7 +509,7 @@ A text paragraph using numeric POD entities: E<60>, E<62>. EOPOD is($results, <<"EOHTML", "Text with numeric entities"); -

    A text paragraph using numeric POD entities: <, >.

    +

    A text paragraph using numeric POD entities: <, >.

    EOHTML @@ -540,6 +542,27 @@ ok $parser->parse_string_document( "=head1 Poit!" ), 'Parse with headers'; like $results, qr{}, 'Should have proper http-equiv meta tag'; +# Test the link generation methods. +is $parser->resolve_pod_page_link('Net::Ping', 'INSTALL'), + "$PERLDOC?Net::Ping#INSTALL", + 'POD link with fragment'; +is $parser->resolve_pod_page_link('perlpodspec'), + "$PERLDOC?perlpodspec", 'Simple POD link'; +is $parser->resolve_pod_page_link(undef, 'SYNOPSIS'), '#SYNOPSIS', + 'Simple fragment link'; +is $parser->resolve_pod_page_link(undef, 'this that'), '#this-that', + 'Fragment link with space'; +is $parser->resolve_pod_page_link('perlpod', 'this that'), + "$PERLDOC?perlpod#this-that", + 'POD link with fragment with space'; + +is $parser->resolve_man_page_link('crontab(5)', 'EXAMPLE CRON FILE'), + "${MANURL}5/crontab", 'Man link with fragment'; +is $parser->resolve_man_page_link('crontab(5)'), + "${MANURL}5/crontab", 'Man link without fragment'; +is $parser->resolve_man_page_link('crontab'), + "${MANURL}1/crontab", 'Man link without section'; + ###################################### sub initialize {