Pod-Markdown-1.500/0000755000175000017500000000000012243671303013012 5ustar randorandoPod-Markdown-1.500/t/0000755000175000017500000000000012243671303013255 5ustar randorandoPod-Markdown-1.500/t/new.t0000644000175000017500000000305612243671303014237 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More 0.88; use Pod::Markdown; sub test_args { my $desc = pop; my $args = shift || {}; my %exp = ( man_url_prefix => $Pod::Markdown::URL_PREFIXES{man}, perldoc_url_prefix => $Pod::Markdown::URL_PREFIXES{metacpan}, perldoc_fragment_format => 'metacpan', markdown_fragment_format => 'markdown', @_ ? %{ $_[0] } : () ); my $parser = Pod::Markdown->new(%$args); foreach my $attr ( sort keys %exp ){ is $parser->$attr, $exp{$attr}, "$desc: $attr"; } } test_args 'Default attributes'; foreach my $site ( qw( metacpan sco ) ){ test_args { perldoc_url_prefix => $site }, { perldoc_url_prefix => $Pod::Markdown::URL_PREFIXES{$site}, perldoc_fragment_format => $site, }, "Set perldoc_url_prefix to $site; get matching fragment format"; } foreach my $format ( map { 'pod_simple_' . $_ } qw( xhtml html ) ){ test_args { perldoc_fragment_format => $format }, { perldoc_fragment_format => $format }, "Explicit format $format"; } foreach my $fragtype ( map { $_ . '_fragment_format' } qw( perldoc markdown ) ){ my $sub = sub { 'blah' }; test_args { $fragtype => $sub }, { $fragtype => $sub }, "Pass a code ref for $fragtype"; } test_args { markdown_fragment_format => 'pod_simple_html', perldoc_fragment_format => 'markdown', }, { markdown_fragment_format => 'pod_simple_html', perldoc_fragment_format => 'markdown', }, 'Values are interchangeable'; done_testing; Pod-Markdown-1.500/t/00-report-prereqs.t0000644000175000017500000000673012243671303016657 0ustar randorando#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec::Functions; use List::Util qw/max/; my @modules = qw( CPAN::Meta CPAN::Meta::Requirements ExtUtils::MakeMaker File::Spec File::Spec::Functions File::Temp IO::Handle IPC::Open3 List::Util Pod::ParseLink Pod::Parser Test::Differences Test::More parent perl strict warnings ); my %exclude = map {; $_ => 1 } qw( ); my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/; $source = "META.yml" unless defined $source; # replace modules with dynamic results from MYMETA.json if we can # (hide CPAN::Meta from prereq scanner) my $cpan_meta = "CPAN::Meta"; my $cpan_meta_req = "CPAN::Meta::Requirements"; my $all_requires; if ( -f $source && eval "require $cpan_meta" ) { ## no critic if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { # Get ALL modules mentioned in META (any phase/type) my $prereqs = $meta->prereqs; delete $prereqs->{develop} if not $ENV{AUTHOR_TESTING}; my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; $uniq{$_} = 1 for @modules; # don't lose any static ones @modules = sort grep { ! $exclude{$_} } keys %uniq; # If verifying, merge 'requires' only for major phases if ( 1 ) { $prereqs = $meta->effective_prereqs; # get the object, not the hash if (eval "require $cpan_meta_req; 1") { ## no critic $all_requires = $cpan_meta_req->new; for my $phase ( qw/configure build test runtime/ ) { $all_requires->add_requirements( $prereqs->requirements_for($phase, 'requires') ); } } } } } my @reports = [qw/Version Module/]; my @dep_errors; my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {}; for my $mod ( @modules ) { next if $mod eq 'perl'; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e catfile($_, $file) } @INC; if ( $prefix ) { my $ver = MM->parse_version( catfile($prefix, $file) ); $ver = "undef" unless defined $ver; # Newer MM should do this anyway push @reports, [$ver, $mod]; if ( 1 && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { if ( ! defined eval { version->parse($ver) } ) { push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)"; } elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) { push @dep_errors, "$mod version '$ver' is not in required range '$req'"; } } } } else { push @reports, ["missing", $mod]; if ( 1 && $all_requires ) { my $req = $req_hash->{$mod}; if ( defined $req && length $req ) { push @dep_errors, "$mod is not installed (version '$req' required)"; } } } } if ( @reports ) { my $vl = max map { length $_->[0] } @reports; my $ml = max map { length $_->[1] } @reports; splice @reports, 1, 0, ["-" x $vl, "-" x $ml]; diag "\nVersions for all modules listed in $source (including optional ones):\n", map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=2 sts=2 sw=2 et: Pod-Markdown-1.500/t/00-compile.t0000644000175000017500000000367112243671303015316 0ustar randorandouse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037 use Test::More tests => 2 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Pod/Markdown.pm' ); my @scripts = ( 'bin/pod2markdown' ); # fake home for cpan-testers use File::Temp; local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 ); my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; my @warnings; for my $lib (@module_files) { # see L open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!.*?\bperl\b\s*(.*)$/; my @flags = $1 ? split(/\s+/, $1) : (); open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$file compiled ok"); # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { warn @_warnings; push @warnings, @_warnings; } } } is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; Pod-Markdown-1.500/t/misc.t0000644000175000017500000001215712243671303014403 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More tests => 1; use Test::Differences; use Pod::Markdown; my $parser = Pod::Markdown->new( # Just return the raw fragment so we know that it isn't unexpectedly mangled. perldoc_fragment_format => sub { $_ }, ); my $pod_prefix = $parser->perldoc_url_prefix; $parser->parse_from_filehandle(\*DATA); my $markdown = $parser->as_markdown; my $expect = < Markdown_File # DESCRIPTION This program uses [Pod::Markdown](${pod_prefix}Pod::Markdown) to convert POD into Markdown sources. It is a filter that expects POD on STDIN and outputs Markdown on STDOUT. FTP is at [ftp://ftp.univie.ac.at/foo/bar](ftp://ftp.univie.ac.at/foo/bar). HTTP is at [http://univie.ac.at/baz/](http://univie.ac.at/baz/). # SEE ALSO This program is strongly based on `pod2mdwn` from [Module::Build::IkiWiki](${pod_prefix}Module::Build::IkiWiki). And see ["foobar"](#foobar) as well. # MORE TESTS ## _Italics_, __Bold__, `Code`, and [Links](${pod_prefix}Links) should work in headers _Italics_, __Bold__, `Code`, and [Links](${pod_prefix}Links) should work in body text. __Nested `codes`__ work, too ## \\_Other\\_ \\*Characters\\* \\[Should\\](Be) \\`Escaped\\` in headers Inline `code _need not_ be escaped`. Inline [link_should_not_be_escaped](${pod_prefix}link_should_not_be_escaped). Inline `filename_should_not_be_escaped` because it is a code span. ### Heading `code _need not_ be escaped, either`. __Nested `c*des` \\_should\\_ be escaped__ (but not code). non-breaking space: foo bar. non-breaking code: `\$x ? \$y : \$z` foo `bar` baz verbatim para B C<< E >> codes A `` code span with `backticks` inside ``. A ```` code span with triple ``` inside ````. - This - is - a basic - bulleted item - list - test - and _Italics_, __Bold__, `Code`, and [Links](${pod_prefix}Links) should work in list item # Links [Formatting `C`odes](${pod_prefix}Links#L<...>) EOMARKDOWN $expect .= <<'EOMARKDOWN'; # \*Special\* characters foo_bar is the result of 4 * 4 Regular characters like \*asterisks\* and \_\_underscores\_\_ should be escaped in regular text paragraphs. Also \[brackets\], lists: \+ a \+ b \- a \- b \# fake headings \#\#\# fake headings \#\#\# \> Quote \> blocks \> 1. with \> 2. lists 1996\. A year. \* Bird \* Magic \* List item `code` block Hr's: \--- \* \* \* Inline \`code\`; Links: \[Foo\] \[1\], \[Bar\](/baz) An image: !\[image\](/foo) backslash \\ From http://daringfireball.net/projects/markdown/syntax: \\ backslash \` backtick \* asterisk \_ underscore {} curly braces \[\] square brackets () parentheses \# hash mark \+ plus sign \- minus sign (hyphen) . dot ! exclamation mark EOMARKDOWN eq_or_diff $markdown, $expect, "this file's POD as markdown"; __DATA__ =head1 POD pod2markdown - Convert POD text to Markdown =head1 SYNOPSIS $ pod2markdown < POD_File > Markdown_File =head1 DESCRIPTION This program uses L to convert POD into Markdown sources. It is a filter that expects POD on STDIN and outputs Markdown on STDOUT. FTP is at L. HTTP is at L. =head1 SEE ALSO This program is strongly based on C from L. And see L as well. =head1 MORE TESTS =head2 I, B, C, and L should work in headers I, B, C, and L should work in body text. B<< Nested C >> work, too =head2 _Other_ *Characters* [Should](Be) `Escaped` in headers Inline C<< code _need not_ be escaped >>. Inline L<< link_should_not_be_escaped >>. Inline F<< filename_should_not_be_escaped >> because it is a code span. =head3 Heading C<< code _need not_ be escaped, either >>. B<< Nested C _should_ be escaped >> (but not code). non-breaking space: S. non-breaking code: S> S baz> verbatim para B C<< E >> codes A C<< code span with `backticks` inside >>. A C<< code span with triple ``` inside >>. =over 4 =item * This =item * is =item * a basic =item * bulleted item =item * list =item * test =item * and I, B, C, and L should work in list item =back =head1 Links L<<< FormattZ<>ing Codes|Links/"LE...E" >>> =head1 *Special* characters foo_bar is the result of 4 * 4 Regular characters like *asterisks* and __underscores__ should be escaped in regular text paragraphs. Also [brackets], lists: + a + b - a - b # fake headings ### fake headings ### > Quote > blocks > 1. with > 2. lists 1996. A year. * Bird * Magic * List item `code` block Hr's: --- * * * Inline `code`; Links: [Foo] [1], [Bar](/baz) An image: ![image](/foo) backslash \ From http://daringfireball.net/projects/markdown/syntax: \ backslash ` backtick * asterisk _ underscore {} curly braces [] square brackets () parentheses # hash mark + plus sign - minus sign (hyphen) . dot ! exclamation mark Pod-Markdown-1.500/t/codes.t0000644000175000017500000000344712243671303014547 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More; use Pod::Markdown; my $pod_prefix = Pod::Markdown->new->perldoc_url_prefix; my $parser = Pod::Markdown->new; my @tests = ( [I => q, q{_italic_}], [B => q, q{__bold__}], [C => q, q{`code`}], [C => q, q{`c*de`}], # links tested extensively in t/links.t [L => q, "[link](${pod_prefix}link)"], [L => q, "[star*](${pod_prefix}star*)"], [E => q, q{<}], [E => q, q{>}], [E => q, q{|}], [E => q, q{/}], [E => q, q{é}], [E => q<0x201E>, q{„}, 'E hex'], [E => q<075>, q{=}, 'E octal'], [E => q<181>, q{µ}, 'E decimal'], # legacy charnames specifically mentioned by perlpodspec [E => q, q{«}], [E => q, q{»}], [E => q, q{&zchevron;}], [E => q, q{&rchevrony;}], [F => q, q{`file.ext`}], [F => q, q{`file_path.ext`}], [S => q<$x ? $y : $z>, q{$x ? $y : $z}], [X => q, q{}], [Z => q, q{}], [Q => q, q{Q}, 'uknown code (Q<>)' ], ); plan tests => scalar @tests * 2; foreach my $test ( @tests ){ my ($code, $text, $exp, $desc) = @$test; $desc ||= "$code<$text>"; # explicitly test interior_sequence (which is what we've defined) is $parser->interior_sequence($code => $text), $exp, $desc . ' (interior_sequence)'; # also test parsing it as pod is $parser->interpolate("$code<<< $text >>>"), $exp, $desc . ' (interpolate)'; } Pod-Markdown-1.500/t/meta.t0000644000175000017500000000232612243671303014373 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More; use Test::Differences; use Pod::Markdown; { package # no_index IOString; sub new { bless [map { "$_\n" } split /\n/, $_[1] ], $_[0] } sub getline { shift @{ $_[0] } } } my @tests; push @tests, ['name', < scalar @tests; foreach my $test ( @tests ) { my ($desc, $pod, $exp) = @$test; my $parser = Pod::Markdown->new; $parser->parse_from_filehandle( IOString->new($pod) ); my $markdown = $parser->as_markdown(with_meta => ($desc ne 'none')); eq_or_diff $markdown, $exp, "meta tags: $desc"; } Pod-Markdown-1.500/t/pod2markdown.t0000644000175000017500000000333112243671303016051 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More; use Test::Differences; use Pod::Markdown; use File::Temp qw{ tempfile }; # core use File::Spec::Functions qw( catfile ); # core my ($lib, $bin) = scalar(grep { /\bblib\Wlib$/ } @INC) ? ('blib/lib', 'blib/script') : ('lib', 'bin'); my $script = catfile($bin, qw(pod2markdown)); my ($tmp_in, $infile) = tempfile( 'pod2markdown-in.XXXXXX', TMPDIR => 1, UNLINK => 1 ); print $tmp_in "=head1 Temp\n\nI\n"; close $tmp_in; my ($tmp_out, $outfile) = tempfile( 'pod2markdown-out.XXXXXX', TMPDIR => 1, UNLINK => 1 ); print $tmp_out "overwrite me\n"; close $tmp_out; # I tried this with IPC::Open2, but windows hangs waiting for more ... sub testp2m { my ($args, $desc) = @_; unshift @$args, $^X, "-I$lib", $script; { open(my $fh, '>', $outfile) or die "Failed to open $outfile: $!"; print $fh "oops\n"; close $fh; } is slurp_file($outfile), "oops\n", 'output file prepared'; system(join ' ', map { length($_) > 1 ? qq["$_"] : $_ } @$args); is slurp_file($outfile), "# Temp\n\n_File_\n", $desc; } testp2m( ['<', $infile, '>', $outfile], 'no args: < in > out', ); testp2m( [$infile, '>', $outfile], '1 arg: input file, stdout', ); testp2m( [$infile, $outfile], '2 args: input file, output file', ); testp2m( ['-', $outfile, '<', $infile], '2 args: - (stdin), output file', ); testp2m( ['-', '-', '<', $infile, '>', $outfile], 'both dashes: - (stdin) - (stdout)', ); done_testing; sub slurp_file { my $path = shift; open(my $fh, '<', $path) or die "Failed to open $path: $!"; slurp_fh($fh) } sub slurp_fh { my $fh = shift; local $/; <$fh>; } Pod-Markdown-1.500/t/links.t0000644000175000017500000002303112243671303014561 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More; use Pod::Markdown; # Test url aliases. local $Pod::Markdown::URL_PREFIXES{manny} = 'http://manny.local/page/'; my $parser = Pod::Markdown->new( # We'll test the various formats later # so for the first set just pass them through. perldoc_fragment_format => sub { $_ }, markdown_fragment_format => sub { $_ }, ); my ($pod_prefix, $man_prefix) = map { ($_->perldoc_url_prefix, $_->man_url_prefix) } $parser->new; my $alt_text_for_urls = (Pod::ParseLink->VERSION >= 1.10); my @tests = ( # in order of L<> examples in perlpod: ['name', q, qq^[name](${pod_prefix}name)^], ['other module', q, qq^[Other::Pod](${pod_prefix}Other::Pod)^], ['section in other module', q, qq^["sec" in Other::Pod](${pod_prefix}Other::Pod#sec)^], ['quoted section in other doc', q, qq^["For Loops" in perlsyn](${pod_prefix}perlsyn#For Loops)^], ['section in this doc', q, qq^["sec"](#sec)^], ['quoted section in this doc', q, qq^["sec"](#sec)^], ['other module, alternate text', q, qq^[other-pod](${pod_prefix}Other::Pod)^], ['other module, empty text', q<|Other::Pod>, qq^[Other::Pod](${pod_prefix}Other::Pod)^], ['sec in other mod, alt text', q, qq^[x-sec](${pod_prefix}Other::Pod#sec)^], ['"sec" in other mod, alt text', q, qq^[x-sec](${pod_prefix}Other::Pod#sec)^], ['/"sec" in this doc, alt text', q, qq^[other-sec](#sec)^], ['/sec in this doc, alt text', q, qq^[other-sec](#sec)^], ['"sec" in this doc, alt text', q, qq^[other-sec](#sec)^], ['external ftp', q, qq^[ftp://server](ftp://server)^], ['external http', q, qq^[http://website](http://website)^], ['http, alt text (perl 5.12)', q, qq^[web](http://website)^], ['embedded codes', q^the docs on C<$.>|perlvar/"$."^, qq^[the docs on `\$.`](${pod_prefix}perlvar#\$.)^], ["don't expand nested L's", q^perlpodspec/"About LE...E Codes"^, qq^["About L<...> Codes" in perlpodspec](${pod_prefix}perlpodspec#About L<...> Codes)^], # perlpodspec examples: ['name', q, qq^[Foo::Bar](${pod_prefix}Foo::Bar)^], ['alt|pod/sec', q, qq^[Perlport's section on NL's](${pod_prefix}perlport#Newlines)^], ['pod/sec', q, qq^["Newlines" in perlport](${pod_prefix}perlport#Newlines)^], ['man/sec', q, qq^["DESCRIPTION" in crontab(5)](${man_prefix}5/crontab)^], ['/section name', q, qq^["Object Attributes"](#Object Attributes)^], ['http', q, qq^[http://www.perl.org/](http://www.perl.org/)^], ['text|http', q, qq^[Perl.org](http://www.perl.org/)^], # man pages ['man(1)', q, qq^[crontab(1)](${man_prefix}1/crontab)^], ['man(5)', q, qq^[crontab(5)](${man_prefix}5/crontab)^], # how should these be handled? these are unlikely/contrived occurrences and are mostly here for test coverage ['man()', q, qq^[crontab()](${man_prefix}1/crontab)^], ['man(X)', q, qq^[crontab(X)](${man_prefix}X/crontab)^], ['man(2)-page', q, qq^[crontab(2)-page](${man_prefix}2/crontab)^], ['(X)man', q<(X)foo>, qq^[(X)foo](${man_prefix}1/(X)foo)^], ['()', q<()>, qq^[()](${man_prefix}1/())^], # varies according to pod-to-html formatter: ['other/section name', q, qq^["Section Name" in Other](${pod_prefix}Other#Section Name)^], # Don't insert backslashes (to escape markdown). ['_underscore_', q<_underscore_>, qq^[_underscore_](${pod_prefix}_underscore_)^], ['*asterisk*', q<*asterisk*>, qq^[*asterisk*](${pod_prefix}*asterisk*)^], # is there something better to do? ['no url: empty', q<>, qq^L<>^], ['no url: pipe', q<|>, qq^L<|>^], ['no url: slash', q, qq^L^], ['no url: quotes', q<"">, qq^L<"">^], ['empty text: |url', q<|http://foo>, qq^[http://foo](http://foo)^], ['false text: 0|url', q<0|http://foo>, qq^[0](http://foo)^], # Alternate parser options: ['man url', q, qq^[crontab(1)](file:///docs/man1/crontab)^, man_url_prefix => 'file:///docs/man'], ['man alias: manny', q, qq^[crontab(1)](http://manny.local/page/1/crontab)^, man_url_prefix => 'manny'], ['man alias: man', q, qq^[crontab(1)](http://man.he.net/man1/crontab)^, man_url_prefix => 'man'], ['pod url', q, qq^[Foo::Bar](http://localhost/pod/Foo::Bar)^, perldoc_url_prefix => 'http://localhost/pod/'], ['pod alias: sco', q, qq^[Foo::Bar](http://search.cpan.org/perldoc?Foo::Bar)^, perldoc_url_prefix => 'sco'], ['pod alias: metacpan', q, qq^[Foo::Bar](https://metacpan.org/pod/Foo::Bar)^, perldoc_url_prefix => 'metacpan'], ['pod alias: perldoc', q, qq^[Foo::Bar](https://metacpan.org/pod/Foo::Bar)^, perldoc_url_prefix => 'perldoc'], ); # Most of these examples were internal links # so we add the perldoc name to make testing easier. test_fragments( q^perlvar/$.^, { # It's unfortunate that Pod::Simple::XHTML can't do links to just symbols: # https://rt.cpan.org/Ticket/Display.html?id=90207 metacpan => q^["$." in perlvar](:perlvar#pod)^, sco => q^["$." in perlvar](:perlvar#$.)^, }, 'section with only symbols', ); test_fragments( q^perlop/"IEO Operators"^, { metacpan => q^["I/O Operators" in perlop](:perlop#I-O-Operators)^, sco => q^["I/O Operators" in perlop](:perlop#I/O_Operators)^, }, 'perlvar.pod: external section with symbols', ); test_fragments( q^perlpodspec/"About LE...E Codes"^, { metacpan => q^["About L<...> Codes" in perlpodspec](:perlpodspec#About-L...-Codes)^, sco => q^["About L<...> Codes" in perlpodspec](:perlpodspec#About_L<...>_Codes)^, markdown => q^["About L<...> Codes" in perlpodspec](:perlpodspec#about-l-codes)^, }, 'section with pod escapes', ); test_fragments( q^perlpodspec/About Data Paragraphs and "=beginE=end" Regions^, { metacpan => q^["About Data Paragraphs and "=begin/=end" Regions" in perlpodspec](:perlpodspec#About-Data-Paragraphs-and-begin-end-Regions)^, sco => q^["About Data Paragraphs and "=begin/=end" Regions" in perlpodspec](:perlpodspec#About_Data_Paragraphs_and_"=begin/=end"_Regions)^, }, 'section with pod commands', ); test_fragments( q^detach|Catalyst/"$c->detach( $action [, \@arguments ] )"^, { metacpan => q^[detach](:Catalyst#c-detach-action-arguments)^, sco => q^[detach](:Catalyst#$c->detach(_$action_[,_\@arguments_]_))^, }, 'section with sigils and syntax', ); test_fragments( q^perlpod/"Formatting Codes"^, { metacpan => q^["Formatting Codes" in perlpod](:perlpod#Formatting-Codes)^, sco => q^["Formatting Codes" in perlpod](:perlpod#Formatting_Codes)^, }, 'quoted section in other doc', ); test_fragments( q, { markdown => q^["Some, OTHER Section!"](#some-other-section)^, }, 'complicated section', ); test_fragments( q, { markdown => qq^["If you have a setup working, share your 'definition' with me. That would be fun!"](#if-you-have-a-setup-working-share-your-definition-with-me-that-would-be-fun)^, }, 'extra long real life example complicated section', ); foreach my $test ( @tests ){ my ($desc, $pod, $mkdn, %opts) = @$test; test_link( (%opts ? Pod::Markdown->new(%opts) : $parser), $pod, $mkdn, $desc, ); } sub test_link { my ($parser, $pod, $mkdn, $desc) = @_; SKIP: { skip 'alt text with schemes/absolute URLs not supported until perl 5.12 / Pod::ParseLink 1.10', 1 if !$alt_text_for_urls && $pod =~ m/\|\w+:[^:\s]\S*\z/; # /alt text \| url (not perl module)/ (regexp from perlpodspec) # interior_sequence is what we specifically want to test is $parser->interior_sequence(L => $pod), $mkdn, $desc . ' (interior_sequence)'; # but interpolate() tests the pod parsing as a whole (which can expose recursion bugs, etc) is $parser->interpolate("L<<< $pod >>>"), $mkdn, $desc . ' (interpolate)'; } } sub test_fragments { my ($pod, $tests, $desc) = @_; foreach my $format ( sort keys %$tests ){ test_link( # Only some combinations of these will normally make sense # but it makes the function reusable. Pod::Markdown->new( perldoc_fragment_format => $format, perldoc_url_prefix => ':', # easier markdown_fragment_format => $format, ), $pod, $tests->{$format}, "$desc: $format", ); } } done_testing; Pod-Markdown-1.500/t/verbatim.t0000644000175000017500000000334412243671303015257 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More tests => 1; use Test::Differences; use Pod::Markdown; my $parser = Pod::Markdown->new; $parser->parse_from_filehandle(\*DATA); my $markdown = $parser->as_markdown; my $expect = <<'EOMARKDOWN'; # SYNOPSIS # 4 spaces # should come out the same # TABS These tabs can be left alone # 3 SPACES 3 spaces should be converted to 4. Here, too And also here. # MIXED (You don't really want to do that, though, do you?) Mixed paragraphs should all get the same indentation added to preserve the formatting: 4 spaces (+ 2 = 6) a tab 3 spaces (+ 2 = 5) 2 spaces (+ 2 = 4) (the minimum) # 5 spaces Because you can if you want to # 1 space a little short, but valid # indented blank lines one two three four # nonindented blank lines one two three four # THAT'S ENOUGH EOMARKDOWN eq_or_diff $markdown, $expect, 'preserve verbatim paragraphs of various initial whitespace combinations'; __DATA__ =head1 SYNOPSIS # 4 spaces # should come out the same =head1 TABS These tabs can be left alone =head1 3 SPACES 3 spaces should be converted to 4. Here, too And also here. =head1 MIXED (You don't really want to do that, though, do you?) Mixed paragraphs should all get the same indentation added to preserve the formatting: 4 spaces (+ 2 = 6) a tab 3 spaces (+ 2 = 5) 2 spaces (+ 2 = 4) (the minimum) =head1 5 spaces Because you can if you want to =head1 1 space a little short, but valid =head1 indented blank lines one two three four =head1 nonindented blank lines one two three four =head1 THAT'S ENOUGH =cut Pod-Markdown-1.500/t/basic.t0000644000175000017500000000147212243671303014527 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More tests => 1; use Test::Differences; use Pod::Markdown; # Test a small, easy section of pod just to show when the parser # is working. We'll test more of the details in other scripts. my $parser = Pod::Markdown->new( ); $parser->parse_from_filehandle(\*DATA); my $markdown = $parser->as_markdown; my $expect = < B I =cut Pod-Markdown-1.500/t/lists.t0000644000175000017500000000446012243671303014604 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: use strict; use warnings; use Test::More tests => 1; use Test::Differences; use Pod::Markdown; my $pod_prefix = Pod::Markdown->new->perldoc_url_prefix; my $parser = Pod::Markdown->new; $parser->parse_from_filehandle(\*DATA); my $markdown = $parser->as_markdown; my $expect = < text), just bullets or numbers - Head1 Paragraph should be indented. - Head2 Paragraph should be indented. - Head1 Paragraph should be indented. ## Unordered nested huddled list - This is a list head. - This is a list head, too. - Again, this is a list head. - Finally, this is also a list head. ## Ordered 1. B 2. D ## Ordered without dot 1. B 2. D EOMARKDOWN # check out Pod::IkiWiki (or something like that)... # the code looks very similar to some of the code in this module # but it appears to have some list processing methods... { eq_or_diff $markdown, $expect, "this file's POD as markdown"; } __DATA__ =head1 Lists =head2 Unordered =over 4 =item * This =item * is =item * a basic =item * bulleted item =item * list =item * test =item * and I, B, C, and L should work in list item and I B C L =item * verbatim paragraphs need double-indent inside lists =back =head2 Unordered nested list B Markdown does not support definition lists (word => text), just bullets or numbers =over 4 =item Head1 Paragraph should be indented. =over 4 =item Head2 Paragraph should be indented. =back =item Head1 Paragraph should be indented. =back =head2 Unordered nested huddled list =over 4 =item * This is a list head. =item * This is a list head, too. =over 4 =item * Again, this is a list head. =back =item * Finally, this is also a list head. =back =head2 Ordered =over =item 1. B =item 2. D =back =head2 Ordered without dot =over =item 1 B =item 2 D =back =cut Pod-Markdown-1.500/bin/0000755000175000017500000000000012243671303013562 5ustar randorandoPod-Markdown-1.500/bin/pod2markdown0000755000175000017500000000472012243671303016122 0ustar randorando#!/usr/local/bin/perl # # This file is part of Pod-Markdown # # This software is copyright (c) 2004 by Marcel Gruenauer. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use 5.008; use strict; use warnings; # PODNAME: pod2markdown # ABSTRACT: Convert POD text to Markdown use Pod::Markdown; my $in_fh = get_handle(shift(@ARGV), '<', \*STDIN); my $out_fh = get_handle(shift(@ARGV), '>', \*STDOUT); convert($in_fh, $out_fh); sub convert { my ($in_file, $out_file) = @_; my $parser = Pod::Markdown->new; $parser->parse_from_filehandle($in_file); print $out_file $parser->as_markdown; } sub get_handle { my ($path, $op, $default) = @_; (!defined($path) || $path eq '-') ? $default : do { open(my $fh, $op, $path) or die "Failed to open '$path': $!\n"; $fh; }; } __END__ =pod =encoding UTF-8 =for :stopwords Marcel Gruenauer Victor Moral Ryan C. Thompson Aristotle Pagaltzis Randy Stauner ACKNOWLEDGEMENTS Graham Ollis Peter Vereshagin Yasutaka ATARASHI motemen moznion =head1 NAME pod2markdown - Convert POD text to Markdown =head1 VERSION version 1.500 =head1 SYNOPSIS # parse STDIN, print to STDOUT $ pod2markdown < POD_File > Markdown_File # parse file, print to STDOUT $ pod2markdown input.pod # parse file, print to file $ pod2markdown input.pod output.mkdn # parse STDIN, print to file $ pod2markdown - output.mkdn =head1 DESCRIPTION This program uses L to convert POD into Markdown sources. It accepts two optional arguments: =over 4 =item * input pod file (defaults to C) =item * output markdown file (defaults to C) =back =head1 SEE ALSO This program is strongly based on C from L. =head1 AUTHORS =over 4 =item * Marcel Gruenauer =item * Victor Moral =item * Ryan C. Thompson =item * Aristotle Pagaltzis =item * Randy Stauner =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2004 by Marcel Gruenauer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Pod-Markdown-1.500/Makefile.PL0000644000175000017500000000334712243671303014773 0ustar randorando use strict; use warnings; use 5.008; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Convert POD to Markdown", "AUTHOR" => "Marcel Gruenauer , Victor Moral , Ryan C. Thompson , Aristotle Pagaltzis , Randy Stauner ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Pod-Markdown", "EXE_FILES" => [ "bin/pod2markdown" ], "LICENSE" => "perl", "NAME" => "Pod::Markdown", "PREREQ_PM" => { "Pod::ParseLink" => "1.10", "Pod::Parser" => "1.51", "parent" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::Util" => 0, "Test::Differences" => 0, "Test::More" => "0.88" }, "VERSION" => "1.500", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::Util" => 0, "Pod::ParseLink" => "1.10", "Pod::Parser" => "1.51", "Test::Differences" => 0, "Test::More" => "0.88", "parent" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Pod-Markdown-1.500/README0000644000175000017500000000044512243671303013675 0ustar randorando This archive contains the distribution Pod-Markdown, version 1.500: Convert POD to Markdown This software is copyright (c) 2004 by Marcel Gruenauer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Pod-Markdown-1.500/lib/0000755000175000017500000000000012243671303013560 5ustar randorandoPod-Markdown-1.500/lib/Pod/0000755000175000017500000000000012243671303014302 5ustar randorandoPod-Markdown-1.500/lib/Pod/Markdown.pm0000644000175000017500000005673412243671303016441 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Pod-Markdown # # This software is copyright (c) 2004 by Marcel Gruenauer. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use 5.008; use strict; use warnings; package Pod::Markdown; { $Pod::Markdown::VERSION = '1.500'; } # git description: v1.401-20-g3999377 BEGIN { $Pod::Markdown::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Convert POD to Markdown use Pod::Parser 1.51 (); use parent qw(Pod::Parser); use Pod::ParseLink (); # core our %URL_PREFIXES = ( sco => 'http://search.cpan.org/perldoc?', metacpan => 'https://metacpan.org/pod/', man => 'http://man.he.net/man', ); $URL_PREFIXES{perldoc} = $URL_PREFIXES{metacpan}; # new() is provided by Pod::Parser (which calls initialize()). sub initialize { my $self = shift; $self->SUPER::initialize(@_); for my $type ( qw( perldoc man ) ){ my $attr = $type . '_url_prefix'; # Use provided argument or default alias. my $url = $self->{ $attr } || $type; # Expand alias if defined (otherwise use url as is). $self->{ $attr } = $URL_PREFIXES{ $url } || $url; } $self->_prepare_fragment_formats; $self->_private; $self; } my @attr = qw( man_url_prefix perldoc_url_prefix perldoc_fragment_format markdown_fragment_format ); { no strict 'refs'; ## no critic foreach my $attr ( @attr ){ *$attr = sub { return $_[0]->{ $attr } }; } } sub _prepare_fragment_formats { my ($self) = @_; foreach my $attr ( @attr ){ next unless $attr =~ /^(\w+)_fragment_format/; my $type = $1; my $format = $self->{ $attr }; # If one was provided. if( $format ){ # If the attribute is a coderef just use it. next if ref($format) eq 'CODE'; } # Else determine a default. else { if( $type eq 'perldoc' ){ # Choose a default that matches the destination url. my $target = $self->{perldoc_url_prefix}; foreach my $alias ( qw( metacpan sco ) ){ if( $target eq $URL_PREFIXES{ $alias } ){ $format = $alias; } } # This seems like a reasonable fallback. $format ||= 'pod_simple_xhtml'; } else { $format = $type; } } # The short name should become a method name with the prefix prepended. my $prefix = 'format_fragment_'; $format =~ s/^$prefix//; die "Unknown fragment format '$format'" unless $self->can($prefix . $format); # Save it. $self->{ $attr } = $format; } return; } sub _private { my $self = shift; $self->{_MyParser} ||= { Text => [], # final text Indent => 0, # list indent levels counter ListType => '-', # character on every item searching => '' , # what are we searching for? (title, author etc.) sstack => [] , # Stack for searching, needed for nested list Title => undef, # page title Author => undef, # page author }; } sub as_markdown { my ($parser, %args) = @_; my $data = $parser->_private; my $lines = $data->{Text}; my @header; if ($args{with_meta}) { @header = $parser->_build_markdown_head; } join("\n" x 2, @header, @{$lines}) . "\n"; } sub _build_markdown_head { my $parser = shift; my $data = $parser->_private; return join "\n", map { qq![[meta \l$_="$data->{$_}"]]! } grep { defined $data->{$_} } qw( Title Author ); } # $prelisthead: # undef : not list head # '' : list head not huddled # otherwise: list head huddled sub _save { my ($parser, $text, $prelisthead) = @_; my $data = $parser->_private; $text = $parser->_indent_text($text, defined($prelisthead)); $text = $prelisthead."\n".$text if defined $prelisthead && $prelisthead ne ''; push @{ $data->{Text} }, $text; return; } sub _unsave { my $parser = shift; my $data = $parser->_private; return pop @{ $data->{Text} }; } sub _indent_text { my ($parser, $text, $listhead) = @_; my $data = $parser->_private; my $level = $data->{Indent}; --$level if $listhead; my $indent = undef; $indent = ' ' x ($level * 4); my @lines = map { $indent . $_; } split(/\n/, $text); return wantarray ? @lines : join("\n", @lines); } sub _clean_text { my $text = $_[1]; my @trimmed = grep { $_; } split(/\n/, $text); return wantarray ? @trimmed : join("\n", @trimmed); } # Backslash escape markdown characters to avoid having them interpreted. sub _escape { local $_ = $_[1]; # do inline characters first s/([][\\`*_#])/\\$1/g; # escape unordered lists and blockquotes s/^([-+*>])/\\$1/mg; # escape dots that would wrongfully create numbered lists s/^( (?:>\s+)? \d+ ) (\.\x20)/$1\\$2/xgm; return $_; } # Formats a header according to the given level. sub format_header { my ($self, $level, $paragraph) = @_; # TODO: put a name="" if $self->{embed_anchor_tags}; ? # https://rt.cpan.org/Ticket/Display.html?id=57776 sprintf '%s %s', '#' x $level, $paragraph; } # Handles POD command paragraphs, denoted by a line beginning with C<=>. sub command { my ($parser, $command, $paragraph, $line_num) = @_; my $data = $parser->_private; # cleaning the text $paragraph = $parser->_clean_text($paragraph); # is it a header ? if ($command =~ m{head(\d)}xms) { my $level = $1; $paragraph = $parser->_escape_and_interpolate($paragraph, $line_num); # the headers never are indented $parser->_save($parser->format_header($level, $paragraph)); if ($level == 1) { if ($paragraph =~ m{NAME}xmsi) { $data->{searching} = 'title'; } elsif ($paragraph =~ m{AUTHOR}xmsi) { $data->{searching} = 'author'; } else { $data->{searching} = ''; } } } # opening a list ? elsif ($command =~ m{over}xms) { # update indent level $data->{Indent}++; push @{$data->{sstack}}, $data->{searching}; # closing a list ? } elsif ($command =~ m{back}xms) { # decrement indent level $data->{Indent}--; $data->{searching} = pop @{$data->{sstack}}; } elsif ($command =~ m{item}xms) { # this strips the POD list head; the searching=listhead will insert markdown's # FIXME: this does not account for named lists # Assuming that POD is correctly wrtitten, we just use POD list head as markdown's $data->{ListType} = '-'; # Default if($paragraph =~ m{^[ \t]* \* [ \t]*}xms) { $paragraph =~ s{^[ \t]* \* [ \t]*}{}xms; } elsif($paragraph =~ m{^[ \t]* (\d+)\.? [ \t]*}xms) { $data->{ListType} = $1.'.'; # For numbered list only $paragraph =~ s{^[ \t]* \d+\.? [ \t]*}{}xms; } if ($data->{searching} eq 'listpara') { $data->{searching} = 'listheadhuddled'; } else { $data->{searching} = 'listhead'; } if (length $paragraph) { $parser->textblock($paragraph, $line_num); } } # ignore other commands return; } # Handles verbatim text. sub verbatim { my ($parser, $paragraph) = @_; # NOTE: perlpodspec says parsers should expand tabs by default # NOTE: Apparently Pod::Parser does not. should we? # NOTE: this might be s/^\t/" " x 8/e, but what about tabs inside the para? # POD verbatim can start with any number of spaces (or tabs) # markdown should be 4 spaces (or a tab) # so indent any paragraphs so that all lines start with at least 4 spaces my @lines = split /\n/, $paragraph; my $indent = ' ' x 4; foreach my $line ( @lines ){ next unless $line =~ m/^( +)/; # find the smallest indentation $indent = $1 if length($1) < length($indent); } if( (my $smallest = length($indent)) < 4 ){ # invert to get what needs to be prepended $indent = ' ' x (4 - $smallest); # leave tabs alone $paragraph = join "\n", map { /^\t/ ? $_ : $indent . $_ } @lines; } # FIXME: Checking _PREVIOUS is breaking Pod::Parser encapsulation # but helps solve the extraneous extra blank line b/t verbatim blocks. # We could probably keep track ourselves if need be. # NOTE: This requires Pod::Parser 1.50. # This is another reason to switch to Pod::Simple. my $previous_was_verbatim = $parser->{_PREVIOUS} && $parser->{_PREVIOUS} eq 'verbatim'; if($previous_was_verbatim && $parser->_private->{Text}->[-1] =~ /[ \t]+$/){ $paragraph = $parser->_unsave . "\n" . $paragraph; } $parser->_save($paragraph); } sub _escape_and_interpolate { my ($parser, $paragraph, $line_num) = @_; # escape markdown characters in text sequences except for inline code $paragraph = join '', $parser->parse_text( { -expand_text => '_escape_non_code' }, $paragraph, $line_num )->raw_text; # interpolate the paragraph for embedded sequences $paragraph = $parser->interpolate($paragraph, $line_num); return $paragraph; } sub _escape_non_code { my ($parser, $text, $ptree) = @_; if ($ptree->isa('Pod::InteriorSequence') && $ptree->cmd_name =~ /\A[CFL]\z/) { return $text; } return $parser->_escape($text); } # Handles normal blocks of POD. sub textblock { my ($parser, $paragraph, $line_num) = @_; my $data = $parser->_private; my $prelisthead; $paragraph = $parser->_escape_and_interpolate($paragraph, $line_num); # clean the empty lines $paragraph = $parser->_clean_text($paragraph); # searching ? if ($data->{searching} =~ m{title|author}xms) { $data->{ ucfirst $data->{searching} } = $paragraph; $data->{searching} = ''; } elsif ($data->{searching} =~ m{listhead(huddled)?$}xms) { my $is_huddled = $1; $paragraph = sprintf '%s %s', $data->{ListType}, $paragraph; if ($is_huddled) { # To compress into an item in order to avoid "\n\n" insertion. $prelisthead = $parser->_unsave(); } else { $prelisthead = ''; } $data->{searching} = 'listpara'; } elsif ($data->{searching} eq 'listpara') { $data->{searching} = ''; } # save the text $parser->_save($paragraph, $prelisthead); } # An interior sequence is an embedded command # within a block of text which appears as a command name - usually a single # uppercase character - followed immediately by a string of text which is # enclosed in angle brackets. sub interior_sequence { my ($self, $seq_command, $seq_argument, $pod_seq) = @_; # nested links are not allowed return sprintf '%s<%s>', $seq_command, $seq_argument if $seq_command eq 'L' && $self->_private->{InsideLink}; my $i = 2; my %interiors = ( 'I' => sub { return '_' . $_[$i] . '_' }, # italic 'B' => sub { return '__' . $_[$i] . '__' }, # bold 'C' => \&_wrap_code_span, # monospace 'F' => \&_wrap_code_span, # system path # non-breaking space 'S' => sub { (my $s = $_[$i]) =~ s/ / /g; return $s; }, 'E' => sub { my $charname = $_[$i]; return '<' if $charname eq 'lt'; return '>' if $charname eq 'gt'; return '|' if $charname eq 'verbar'; return '/' if $charname eq 'sol'; # convert legacy charnames to more modern ones (see perlpodspec) $charname =~ s/\A([lr])chevron\z/${1}aquo/; return "&#$1;" if $charname =~ /^0(x[0-9a-fA-Z]+)$/; $charname = oct($charname) if $charname =~ /^0\d+$/; return "&#$charname;" if $charname =~ /^\d+$/; return "&$charname;"; }, 'L' => \&_resolv_link, # TODO: create `a name=` if configured? 'X' => sub { '' }, 'Z' => sub { '' }, ); if (exists $interiors{$seq_command}) { my $code = $interiors{$seq_command}; return $code->($self, $seq_command, $seq_argument, $pod_seq); } else { return sprintf '%s<%s>', $seq_command, $seq_argument; } } sub _resolv_link { my ($self, $cmd, $arg) = @_; local $self->_private->{InsideLink} = 1; my ($text, $inferred, $name, $section, $type) = # perlpodspec says formatting codes can occur in all parts of an L<> map { $_ && $self->interpolate($_, 1) } Pod::ParseLink::parselink($arg); my $url = ''; if ($type eq 'url') { $url = $name; } elsif ($type eq 'man') { $url = $self->format_man_url($name); } else { $url = $self->format_perldoc_url($name, $section); } # if we don't know how to handle the url just print the pod back out if (!$url) { return sprintf '%s<%s>', $cmd, $arg; } # TODO: put unescaped section into link title? [a](b "c") return sprintf '[%s](%s)', ($text || $inferred), $url; } # A code span can be delimited by multiple backticks (and a space) # similar to pod codes (C<< code >>), so ensure we use a big enough # delimiter to not have it broken by embedded backticks. sub _wrap_code_span { my ($self, undef, $arg) = @_; my $longest = 0; while( $arg =~ /([`]+)/g ){ my $len = length($1); $longest = $len if $longest < $len; } my $delim = '`' x ($longest + 1); my $pad = $longest > 0 ? ' ' : ''; return $delim . $pad . $arg . $pad . $delim; } sub format_man_url { my ($self, $to) = @_; my ($page, $part) = ($to =~ /^ ([^(]+) (?: \( (\S+) \) )? /x); return $self->man_url_prefix . ($part || 1) . '/' . ($page || $to); } sub format_perldoc_url { my ($self, $name, $section) = @_; my $url_prefix = $self->perldoc_url_prefix; my $url = ''; # If the link is to another module (external link). if ($name) { $url = $url_prefix . $name; } # See https://rt.cpan.org/Ticket/Display.html?id=57776 # for a discussion on the need to mangle the section. if ($section){ my $method = $url # If we already have a prefix on the url it's external. ? $self->perldoc_fragment_format # Else an internal link points to this markdown doc. : $self->markdown_fragment_format; $method = 'format_fragment_' . $method unless ref($method); { # Set topic to enable code refs to be simple. local $_ = $section; $section = $self->$method($section); } $url .= '#' . $section; } return $url; } # TODO: simple, pandoc, etc? sub format_fragment_markdown { my ($self, $section) = @_; # If this is an internal link (to another section in this doc) # we can't be sure what the heading id's will look like # (it depends on what is rendering the markdown to html) # but we can try to follow popular conventions. # http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html#header-identifiers-in-html-latex-and-context #$section =~ s/(?![-_.])[[:punct:]]//g; #$section =~ s/\s+/-/g; $section =~ s/\W+/-/g; $section =~ s/-+$//; $section =~ s/^-+//; $section = lc $section; #$section =~ s/^[^a-z]+//; $section ||= 'section'; return $section; } { # From Pod::Simple::XHTML 3.28. # The strings gets passed through encode_entities() before idify(). # If we don't do it here the substitutions below won't operate consistently. # encode_entities { my %entities = ( q{>} => 'gt', q{<} => 'lt', q{'} => '#39', q{"} => 'quot', q{&} => 'amp', ); my $ents = join '', keys %entities; # } sub format_fragment_pod_simple_xhtml { my ($self, $t) = @_; # encode_entities { $t =~ s/([$ents])/'&' . ($entities{$1} || sprintf '#x%X', ord $1) . ';'/ge; # } # idify { for ($t) { s/<[^>]+>//g; # Strip HTML. s/&[^;]+;//g; # Strip entities. s/^\s+//; s/\s+$//; # Strip white space. s/^([^a-zA-Z]+)$/pod$1/; # Prepend "pod" if no valid chars. s/^[^a-zA-Z]+//; # First char must be a letter. s/[^-a-zA-Z0-9_:.]+/-/g; # All other chars must be valid. s/[-:.]+$//; # Strip trailing punctuation. } # } return $t; } } sub format_fragment_pod_simple_html { my ($self, $section) = @_; # From Pod::Simple::HTML 3.28. # section_name_tidy { $section =~ s/^\s+//; $section =~ s/\s+$//; $section =~ tr/ /_/; $section =~ tr/\x00-\x1F\x80-\x9F//d if 'A' eq chr(65); # drop crazy characters #$section = $self->unicode_escape_url($section); # unicode_escape_url { $section =~ s/([^\x00-\xFF])/'('.ord($1).')'/eg; # Turn char 1234 into "(1234)" # } $section = '_' unless length $section; return $section; # } } sub format_fragment_metacpan { shift->format_fragment_pod_simple_xhtml(@_); } sub format_fragment_sco { shift->format_fragment_pod_simple_html(@_); } 1; __END__ =pod =encoding UTF-8 =for :stopwords Marcel Gruenauer Victor Moral Ryan C. Thompson Aristotle Pagaltzis Randy Stauner ACKNOWLEDGEMENTS ATARASHI motemen moznion Graham Ollis Peter Vereshagin Yasutaka textblock html cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME Pod::Markdown - Convert POD to Markdown =head1 VERSION version 1.500 =head1 SYNOPSIS my $parser = Pod::Markdown->new; $parser->parse_from_filehandle(\*STDIN); print $parser->as_markdown; =head1 DESCRIPTION This module subclasses L and converts POD to Markdown. Literal characters in Pod that are special in Markdown (like *asterisks*) are backslash-escaped when appropriate. =head1 METHODS =head2 new Pod::Markdown->new(%options); The constructor accepts the following named arguments: =over 4 =item * C Alters the man page urls that are created from C<< LEE >> codes. The default is C. =item * C Alters the perldoc urls that are created from C<< LEE >> codes. Can be: =over 4 =item * C (shortcut for C) =item * C (shortcut for C) =item * any url =back The default is C. Pod::Markdown->new(perldoc_url_prefix => 'http://localhost/perl/pod'); =item * C Alters the format of the url fragment for any C<< LEE >> links that point to a section of an external document (C<< L >>). The default will be chosen according to the destination L. Alternatively you can specify one of the following: =over 4 =item * C =item * C =item * C =item * C =item * A code ref =back The code ref can expect to receive two arguments: the parser object (C<$self>) and the section text. For convenience the topic variable (C<$_>) is also set to the section text: perldoc_fragment_format => sub { s/\W+/-/g; } =item * C Alters the format of the url fragment for any C<< LEE >> links that point to an internal section of this document (C<< L >>). Unfortunately the format of the id attributes produced by whatever system translates the markdown into html is unknown at the time the markdown is generated so we do some simple clean up. B C and C accept the same values: a (shortcut to a) method name or a code ref. =back =head2 man_url_prefix Returns the url prefix in use for man pages. =head2 perldoc_url_prefix Returns the url prefix in use (after resolving shortcuts to urls). =head2 perldoc_fragment_format Returns the coderef or format name used to format a url fragment to a section in an external document. =head2 markdown_fragment_format Returns the coderef or format name used to format a url fragment to an internal section in this document. =head2 as_markdown Returns the parsed POD as Markdown. Takes named arguments. If the C argument is given a positive value, meta tags are generated as well. =head2 format_man_url Used internally to create a url (using L) from a string like C. =head2 format_perldoc_url # With $name and section being the two parts of L. my $url = $parser->format_perldoc_url($name, $section); Used internally to create a url from the name (of a module or script) and a possible section (heading). The format of the url fragment (when pointing to a section in a document) varies depending on the destination url so L is used (which can be customized). If the module name portion of the link is blank then the section is treated as an internal fragment link (to a section of the generated markdown document) and L is used (which can be customized). =head2 format_fragment_markdown Format url fragment for an internal link by replacing non-word characters with dashes. =head2 format_fragment_pod_simple_xhtml Format url fragment like L. =head2 format_fragment_pod_simple_html Format url fragment like L. =head2 format_fragment_metacpan Format fragment for L (uses L). =head2 format_fragment_sco Format fragment for L (uses L). =for Pod::Coverage format_header initialize command interior_sequence textblock verbatim =head1 SEE ALSO =over 4 =item * L - script included for command line usage =back =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc Pod::Markdown =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code L git clone https://github.com/rwstauner/Pod-Markdown.git =head1 AUTHORS =over 4 =item * Marcel Gruenauer =item * Victor Moral =item * Ryan C. Thompson =item * Aristotle Pagaltzis =item * Randy Stauner =back =head1 CONTRIBUTORS =over 4 =item * Aristotle Pagaltzis =item * Graham Ollis =item * Peter Vereshagin =item * Ryan C. Thompson =item * Yasutaka ATARASHI =item * motemen =item * moznion =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2004 by Marcel Gruenauer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Pod-Markdown-1.500/MANIFEST0000644000175000017500000000126312243671303014145 0ustar randorandoChanges LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README bin/pod2markdown dist.ini lib/Pod/Markdown.pm t/00-compile.t t/00-report-prereqs.t t/basic.t t/codes.t t/links.t t/lists.t t/meta.t t/misc.t t/new.t t/pod2markdown.t t/verbatim.t xt/author/critic.t xt/author/pod-spell.t xt/author/test-eol.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/dist-manifest.t xt/release/distmeta.t xt/release/kwalitee.t xt/release/meta-json.t xt/release/minimum-version.t xt/release/mojibake.t xt/release/no-tabs.t xt/release/pod-coverage.t xt/release/pod-syntax.t xt/release/portability.t xt/release/synopsis.t xt/release/test-version.t xt/release/unused-vars.t Pod-Markdown-1.500/META.json0000644000175000017500000005516012243671303014442 0ustar randorando{ "abstract" : "Convert POD to Markdown", "author" : [ "Marcel Gruenauer ", "Victor Moral ", "Ryan C. Thompson ", "Aristotle Pagaltzis ", "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Pod-Markdown", "no_index" : { "directory" : [ "corpus", "examples", "inc", "share", "t", "xt" ], "namespace" : [ "Local", "t::lib" ], "package" : [ "DB" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::Kwalitee" : "1.12", "Test::More" : "0", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Pod::ParseLink" : "1.10", "Pod::Parser" : "1.51", "parent" : "0", "perl" : "5.008", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "0", "CPAN::Meta::Requirements" : "0" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Spec::Functions" : "0", "File::Temp" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "List::Util" : "0", "Test::Differences" : "0", "Test::More" : "0.88" } } }, "provides" : { "Pod::Markdown" : { "file" : "lib/Pod/Markdown.pm", "version" : "1.500" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-pod-markdown at rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Markdown" }, "homepage" : "https://github.com/rwstauner/Pod-Markdown", "repository" : { "type" : "git", "url" : "https://github.com/rwstauner/Pod-Markdown.git", "web" : "https://github.com/rwstauner/Pod-Markdown" } }, "version" : "1.500", "x_Dist_Zilla" : { "perl" : { "version" : "5.016003" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Bootstrap::lib", "config" : { "Dist::Zilla::Role::Bootstrap" : { "distname" : "Pod-Markdown", "fallback" : "1", "try_built" : null, "try_built_method" : "mtime" } }, "name" : "Bootstrap::lib", "version" : "0.04000002" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::RWSTAUNER/Git::NextVersion", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::GenerateFile", "name" : "@Author::RWSTAUNER/GenerateManifestSkip", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@Author::RWSTAUNER/GatherDir", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::RWSTAUNER/PruneCruft", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::RWSTAUNER/ManifestSkip", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneDevelCoverDatabase", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneCodeStatCollection", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneTags", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::RWSTAUNER/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::RWSTAUNER/NextRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::RWSTAUNER/Git::Describe", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::RWSTAUNER/PkgVersion", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@Author::RWSTAUNER/Prepender", "version" : "1.112280" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugin" : "@Author::RWSTAUNER", "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::Encoding", "name" : "@Author::RWSTAUNER/Encoding", "version" : "0.02" }, { "class" : "Pod::Weaver::Plugin::WikiDoc", "name" : "@Author::RWSTAUNER/WikiDoc", "version" : "0.093003" }, { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::RWSTAUNER/Name", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::RWSTAUNER/Version", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::RWSTAUNER/Prelude", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@Author::RWSTAUNER/Synopsis", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@Author::RWSTAUNER/Description", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@Author::RWSTAUNER/Overview", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@Author::RWSTAUNER/Usage", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "@Author::RWSTAUNER/Class Methods", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "@Author::RWSTAUNER/Attributes", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "@Author::RWSTAUNER/Methods", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "@Author::RWSTAUNER/Functions", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::RWSTAUNER/Leftovers", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::RWSTAUNER/Postlude", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Support", "name" : "@Author::RWSTAUNER/Support", "version" : "1.005" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "@Author::RWSTAUNER/Acknowledgements", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::RWSTAUNER/Authors", "version" : "4.004" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::RWSTAUNER/Contributors", "version" : "0.006" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::RWSTAUNER/Legal", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::RWSTAUNER/List", "version" : "4.004" }, { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "@Author::RWSTAUNER/StopWords", "version" : "1.008" } ] } }, "name" : "@Author::RWSTAUNER/PodWeaver", "version" : "4.002" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::RWSTAUNER/License", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::RWSTAUNER/Readme", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::RWSTAUNER/ReadmeAnyFromPod", "version" : "0.131500" }, { "class" : "Dist::Zilla::Plugin::Bugtracker", "name" : "@Author::RWSTAUNER/Bugtracker", "version" : "1.111080" }, { "class" : "Dist::Zilla::Plugin::Repository", "name" : "@Author::RWSTAUNER/Repository", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::RWSTAUNER/GithubMeta", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "@Author::RWSTAUNER/ContributorsFromGit", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::RWSTAUNER/AutoPrereqs", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::RWSTAUNER/MetaNoIndex", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::RWSTAUNER/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : {}, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Author::RWSTAUNER/MetaProvides::Package", "version" : "1.15000000" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::RWSTAUNER/MinimumPerl", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::RWSTAUNER/MetaConfig", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::RWSTAUNER/MetaYAML", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::RWSTAUNER/MetaJSON", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::RWSTAUNER/ExecDir", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::RWSTAUNER/ShareDir", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@Author::RWSTAUNER/MakeMaker", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::RWSTAUNER/Test::ReportPrereqs", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::RWSTAUNER/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "name" : "@Author::RWSTAUNER/Test::PodSpelling", "version" : "2.006001" }, { "class" : "Dist::Zilla::Plugin::Test::UnusedVars", "name" : "@Author::RWSTAUNER/@TestingMania/Test::UnusedVars", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Portability", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::RWSTAUNER/@TestingMania/PodCoverageTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Perl::Critic", "version" : "2.112410" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::RWSTAUNER/@TestingMania/Test::CPAN::Changes", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::RWSTAUNER/@TestingMania/MetaTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Kwalitee", "version" : "2.07" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "name" : "@Author::RWSTAUNER/@TestingMania/Test::EOL", "version" : "0.08" }, { "class" : "Dist::Zilla::Plugin::Test::Synopsis", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Synopsis", "version" : "2.000004" }, { "class" : "Dist::Zilla::Plugin::Test::DistManifest", "name" : "@Author::RWSTAUNER/@TestingMania/Test::DistManifest", "version" : "2.000004" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON", "name" : "@Author::RWSTAUNER/@TestingMania/Test::CPAN::Meta::JSON", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@Author::RWSTAUNER/@TestingMania/Test::Compile", "version" : "2.037" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::RWSTAUNER/@TestingMania/Test::MinimumVersion", "version" : "2.000005" }, { "class" : "Dist::Zilla::Plugin::NoTabsTests", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "module_finder" : [ ":InstallModules" ], "script_finder" : [ ":ExecFiles" ] } }, "name" : "@Author::RWSTAUNER/@TestingMania/NoTabsTests", "version" : "0.05" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::RWSTAUNER/@TestingMania/MojibakeTests", "version" : "0.5" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::RWSTAUNER/@TestingMania/PodSyntaxTests", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::RWSTAUNER/Manifest", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@Author::RWSTAUNER/CheckExtraTests", "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Author::RWSTAUNER/CheckChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::CheckMetaResources", "name" : "@Author::RWSTAUNER/CheckMetaResources", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::RWSTAUNER/CheckPrereqsIndexed", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::RWSTAUNER/TestRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::RWSTAUNER/@Git/Check", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::RWSTAUNER/@Git/Commit", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::RWSTAUNER/@Git/Tag", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::RWSTAUNER/@Git/Push", "version" : "2.017" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::RWSTAUNER/ConfirmRelease", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::RWSTAUNER/UploadToCPAN", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::RWSTAUNER/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.006" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.006" } }, "x_authority" : "cpan:RWSTAUNER", "x_contributors" : [ "Aristotle Pagaltzis ", "Graham Ollis ", "Peter Vereshagin ", "Ryan C. Thompson ", "Yasutaka ATARASHI ", "motemen ", "moznion " ] } Pod-Markdown-1.500/MANIFEST.SKIP0000644000175000017500000000013212243671303014704 0ustar randorando \B\.git\b \B\.gitignore$ ^[\._]build ^blib/ ^(Build|Makefile)$ \bpm_to_blib$ ^MYMETA\. Pod-Markdown-1.500/LICENSE0000644000175000017500000004366712243671303014037 0ustar randorandoThis software is copyright (c) 2004 by Marcel Gruenauer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2004 by Marcel Gruenauer. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2004 by Marcel Gruenauer. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Pod-Markdown-1.500/META.yml0000644000175000017500000003563012243671303014272 0ustar randorando--- abstract: 'Convert POD to Markdown' author: - 'Marcel Gruenauer ' - 'Victor Moral ' - 'Ryan C. Thompson ' - 'Aristotle Pagaltzis ' - 'Randy Stauner ' build_requires: ExtUtils::MakeMaker: 0 File::Spec: 0 File::Spec::Functions: 0 File::Temp: 0 IO::Handle: 0 IPC::Open3: 0 List::Util: 0 Test::Differences: 0 Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Pod-Markdown no_index: directory: - corpus - examples - inc - share - t - xt namespace: - Local - t::lib package: - DB provides: Pod::Markdown: file: lib/Pod/Markdown.pm version: 1.500 requires: Pod::ParseLink: 1.10 Pod::Parser: 1.51 parent: 0 perl: 5.008 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Markdown homepage: https://github.com/rwstauner/Pod-Markdown repository: https://github.com/rwstauner/Pod-Markdown.git version: 1.500 x_Dist_Zilla: perl: version: 5.016003 plugins: - class: Dist::Zilla::Plugin::Bootstrap::lib config: Dist::Zilla::Role::Bootstrap: distname: Pod-Markdown fallback: 1 try_built: ~ try_built_method: mtime name: Bootstrap::lib version: 0.04000002 - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::RWSTAUNER/Git::NextVersion' version: 2.017 - class: Dist::Zilla::Plugin::GenerateFile name: '@Author::RWSTAUNER/GenerateManifestSkip' version: 5.006 - class: Dist::Zilla::Plugin::GatherDir name: '@Author::RWSTAUNER/GatherDir' version: 5.006 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::RWSTAUNER/PruneCruft' version: 5.006 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::RWSTAUNER/ManifestSkip' version: 5.006 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneDevelCoverDatabase' version: 5.006 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneCodeStatCollection' version: 5.006 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneTags' version: 5.006 - class: Dist::Zilla::Plugin::Authority name: '@Author::RWSTAUNER/Authority' version: 1.006 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::RWSTAUNER/NextRelease' version: 5.006 - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::RWSTAUNER/Git::Describe' version: 0.003 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::RWSTAUNER/PkgVersion' version: 5.006 - class: Dist::Zilla::Plugin::Prepender name: '@Author::RWSTAUNER/Prepender' version: 1.112280 - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugin: '@Author::RWSTAUNER' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::Encoding name: '@Author::RWSTAUNER/Encoding' version: 0.02 - class: Pod::Weaver::Plugin::WikiDoc name: '@Author::RWSTAUNER/WikiDoc' version: 0.093003 - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: 4.004 - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: 4.004 - class: Pod::Weaver::Section::Name name: '@Author::RWSTAUNER/Name' version: 4.004 - class: Pod::Weaver::Section::Version name: '@Author::RWSTAUNER/Version' version: 4.004 - class: Pod::Weaver::Section::Region name: '@Author::RWSTAUNER/Prelude' version: 4.004 - class: Pod::Weaver::Section::Generic name: '@Author::RWSTAUNER/Synopsis' version: 4.004 - class: Pod::Weaver::Section::Generic name: '@Author::RWSTAUNER/Description' version: 4.004 - class: Pod::Weaver::Section::Generic name: '@Author::RWSTAUNER/Overview' version: 4.004 - class: Pod::Weaver::Section::Generic name: '@Author::RWSTAUNER/Usage' version: 4.004 - class: Pod::Weaver::Section::Collect name: '@Author::RWSTAUNER/Class Methods' version: 4.004 - class: Pod::Weaver::Section::Collect name: '@Author::RWSTAUNER/Attributes' version: 4.004 - class: Pod::Weaver::Section::Collect name: '@Author::RWSTAUNER/Methods' version: 4.004 - class: Pod::Weaver::Section::Collect name: '@Author::RWSTAUNER/Functions' version: 4.004 - class: Pod::Weaver::Section::Leftovers name: '@Author::RWSTAUNER/Leftovers' version: 4.004 - class: Pod::Weaver::Section::Region name: '@Author::RWSTAUNER/Postlude' version: 4.004 - class: Pod::Weaver::Section::Support name: '@Author::RWSTAUNER/Support' version: 1.005 - class: Pod::Weaver::Section::Generic name: '@Author::RWSTAUNER/Acknowledgements' version: 4.004 - class: Pod::Weaver::Section::Authors name: '@Author::RWSTAUNER/Authors' version: 4.004 - class: Pod::Weaver::Section::Contributors name: '@Author::RWSTAUNER/Contributors' version: 0.006 - class: Pod::Weaver::Section::Legal name: '@Author::RWSTAUNER/Legal' version: 4.004 - class: Pod::Weaver::Plugin::Transformer name: '@Author::RWSTAUNER/List' version: 4.004 - class: Pod::Weaver::Plugin::StopWords name: '@Author::RWSTAUNER/StopWords' version: 1.008 name: '@Author::RWSTAUNER/PodWeaver' version: 4.002 - class: Dist::Zilla::Plugin::License name: '@Author::RWSTAUNER/License' version: 5.006 - class: Dist::Zilla::Plugin::Readme name: '@Author::RWSTAUNER/Readme' version: 5.006 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::RWSTAUNER/ReadmeAnyFromPod' version: 0.131500 - class: Dist::Zilla::Plugin::Bugtracker name: '@Author::RWSTAUNER/Bugtracker' version: 1.111080 - class: Dist::Zilla::Plugin::Repository name: '@Author::RWSTAUNER/Repository' version: 0.19 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::RWSTAUNER/GithubMeta' version: 0.42 - class: Dist::Zilla::Plugin::ContributorsFromGit name: '@Author::RWSTAUNER/ContributorsFromGit' version: 0.006 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::RWSTAUNER/AutoPrereqs' version: 5.006 - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::RWSTAUNER/MetaNoIndex' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: '@Author::RWSTAUNER/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: 5.006 - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: {} Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: 1 inherit_version: 1 meta_noindex: 1 name: '@Author::RWSTAUNER/MetaProvides::Package' version: 1.15000000 - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::RWSTAUNER/MinimumPerl' version: 1.003 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::RWSTAUNER/MetaConfig' version: 5.006 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::RWSTAUNER/MetaYAML' version: 5.006 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::RWSTAUNER/MetaJSON' version: 5.006 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::RWSTAUNER/ExecDir' version: 5.006 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::RWSTAUNER/ShareDir' version: 5.006 - class: Dist::Zilla::Plugin::MakeMaker name: '@Author::RWSTAUNER/MakeMaker' version: 5.006 - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::RWSTAUNER/Test::ReportPrereqs' version: 0.010 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::RWSTAUNER/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::Test::PodSpelling name: '@Author::RWSTAUNER/Test::PodSpelling' version: 2.006001 - class: Dist::Zilla::Plugin::Test::UnusedVars name: '@Author::RWSTAUNER/@TestingMania/Test::UnusedVars' version: 2.000005 - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::RWSTAUNER/@TestingMania/Test::Portability' version: 2.000005 - class: Dist::Zilla::Plugin::Test::Version name: '@Author::RWSTAUNER/@TestingMania/Test::Version' version: 0.002004 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::RWSTAUNER/@TestingMania/PodCoverageTests' version: 5.006 - class: Dist::Zilla::Plugin::Test::Perl::Critic name: '@Author::RWSTAUNER/@TestingMania/Test::Perl::Critic' version: 2.112410 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::RWSTAUNER/@TestingMania/Test::CPAN::Changes' version: 0.008 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::RWSTAUNER/@TestingMania/MetaTests' version: 5.006 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@Author::RWSTAUNER/@TestingMania/Test::Kwalitee' version: 2.07 - class: Dist::Zilla::Plugin::Test::EOL name: '@Author::RWSTAUNER/@TestingMania/Test::EOL' version: 0.08 - class: Dist::Zilla::Plugin::Test::Synopsis name: '@Author::RWSTAUNER/@TestingMania/Test::Synopsis' version: 2.000004 - class: Dist::Zilla::Plugin::Test::DistManifest name: '@Author::RWSTAUNER/@TestingMania/Test::DistManifest' version: 2.000004 - class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON name: '@Author::RWSTAUNER/@TestingMania/Test::CPAN::Meta::JSON' version: 0.003 - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: filename: t/00-compile.t module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@Author::RWSTAUNER/@TestingMania/Test::Compile' version: 2.037 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::RWSTAUNER/@TestingMania/Test::MinimumVersion' version: 2.000005 - class: Dist::Zilla::Plugin::NoTabsTests config: Dist::Zilla::Plugin::Test::NoTabs: module_finder: - ':InstallModules' script_finder: - ':ExecFiles' name: '@Author::RWSTAUNER/@TestingMania/NoTabsTests' version: 0.05 - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::RWSTAUNER/@TestingMania/MojibakeTests' version: 0.5 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::RWSTAUNER/@TestingMania/PodSyntaxTests' version: 5.006 - class: Dist::Zilla::Plugin::Manifest name: '@Author::RWSTAUNER/Manifest' version: 5.006 - class: Dist::Zilla::Plugin::CheckExtraTests name: '@Author::RWSTAUNER/CheckExtraTests' version: 0.016 - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Author::RWSTAUNER/CheckChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::CheckMetaResources name: '@Author::RWSTAUNER/CheckMetaResources' version: 0.001 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::RWSTAUNER/CheckPrereqsIndexed' version: 0.009 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::RWSTAUNER/TestRelease' version: 5.006 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::RWSTAUNER/@Git/Check' version: 2.017 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::RWSTAUNER/@Git/Commit' version: 2.017 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::RWSTAUNER/@Git/Tag' version: 2.017 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::RWSTAUNER/@Git/Push' version: 2.017 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::RWSTAUNER/ConfirmRelease' version: 5.006 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::RWSTAUNER/UploadToCPAN' version: 5.006 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::RWSTAUNER/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 5.006 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 5.006 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 5.006 x_authority: cpan:RWSTAUNER x_contributors: - 'Aristotle Pagaltzis ' - 'Graham Ollis ' - 'Peter Vereshagin ' - 'Ryan C. Thompson ' - 'Yasutaka ATARASHI ' - 'motemen ' - 'moznion ' Pod-Markdown-1.500/xt/0000755000175000017500000000000012243671303013445 5ustar randorandoPod-Markdown-1.500/xt/author/0000755000175000017500000000000012243671303014747 5ustar randorandoPod-Markdown-1.500/xt/author/test-eol.t0000644000175000017500000000023712243671303016672 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::EOL 0.08 use Test::EOL; all_perl_files_ok({ trailing_whitespace => 0 }); Pod-Markdown-1.500/xt/author/pod-spell.t0000644000175000017500000000075412243671303017041 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006001 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Marcel Gruenauer marcel Victor Moral victor Ryan Thompson rct at thompsonclan d0t org Aristotle Pagaltzis pagaltzis Randy Stauner rwstauner aristotle Graham Ollis plicease Peter Vereshagin veresc rthompson Yasutaka ATARASHI yakex motemen moznion lib Pod Markdown Pod-Markdown-1.500/xt/author/critic.t0000644000175000017500000000043512243671303016413 0ustar randorando#!perl use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; all_critic_ok(); Pod-Markdown-1.500/xt/release/0000755000175000017500000000000012243671303015065 5ustar randorandoPod-Markdown-1.500/xt/release/kwalitee.t0000644000175000017500000000016612243671303017062 0ustar randorando# this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07 use strict; use warnings; use Test::Kwalitee; Pod-Markdown-1.500/xt/release/pod-coverage.t0000644000175000017500000000052712243671303017631 0ustar randorando#!perl use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Pod-Markdown-1.500/xt/release/pod-syntax.t0000644000175000017500000000021212243671303017353 0ustar randorando#!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); Pod-Markdown-1.500/xt/release/portability.t0000644000175000017500000000027612243671303017621 0ustar randorando#!perl use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); Pod-Markdown-1.500/xt/release/cpan-changes.t0000644000175000017500000000026312243671303017602 0ustar randorando#!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Pod-Markdown-1.500/xt/release/mojibake.t0000644000175000017500000000040612243671303017033 0ustar randorando#!perl use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); Pod-Markdown-1.500/xt/release/minimum-version.t0000644000175000017500000000026612243671303020414 0ustar randorando#!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008} ); Pod-Markdown-1.500/xt/release/changes_has_content.t0000644000175000017500000000201112243671303021241 0ustar randorando#!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.500'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Pod-Markdown-1.500/xt/release/no-tabs.t0000644000175000017500000000037112243671303016616 0ustar randorandouse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::NoTabsTests 0.05 use Test::More 0.88; use Test::NoTabs; my @files = ( 'bin/pod2markdown', 'lib/Pod/Markdown.pm' ); notabs_ok($_) foreach @files; done_testing; Pod-Markdown-1.500/xt/release/synopsis.t0000644000175000017500000000022012243671303017133 0ustar randorando#!perl use Test::More; eval "use Test::Synopsis"; plan skip_all => "Test::Synopsis required for testing synopses" if $@; all_synopsis_ok(); Pod-Markdown-1.500/xt/release/unused-vars.t0000644000175000017500000000020712243671303017525 0ustar randorando#!perl use Test::More; eval "use Test::Vars"; plan skip_all => "Test::Vars required for testing unused vars" if $@; all_vars_ok(); Pod-Markdown-1.500/xt/release/test-version.t0000644000175000017500000000064312243671303017717 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 0.002004 BEGIN { eval "use Test::Version; 1;" or die $@; } my @imports = ( 'version_all_ok' ); my $params = { is_strict => 0, has_version => 1, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; Pod-Markdown-1.500/xt/release/dist-manifest.t0000644000175000017500000000023012243671303020014 0ustar randorando#!perl use Test::More; eval "use Test::DistManifest"; plan skip_all => "Test::DistManifest required for testing the manifest" if $@; manifest_ok(); Pod-Markdown-1.500/xt/release/meta-json.t0000644000175000017500000000023312243671303017145 0ustar randorando#!perl use Test::More; eval 'use Test::CPAN::Meta::JSON'; plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@; meta_json_ok(); Pod-Markdown-1.500/xt/release/distmeta.t0000644000175000017500000000021712243671303017064 0ustar randorando#!perl use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); Pod-Markdown-1.500/dist.ini0000644000175000017500000000137312243671303014462 0ustar randorandoname = Pod-Markdown author = Marcel Gruenauer author = Victor Moral author = Ryan C. Thompson author = Aristotle Pagaltzis author = Randy Stauner copyright_holder = Marcel Gruenauer copyright_year = 2004 [Bootstrap::lib] [@Author::RWSTAUNER] ; This seems broken (https://rt.cpan.org/Public/Bug/Display.html?id=73280) -remove = Test::Pod::LinkCheck ReadmeAnyFromPod.type = markdown Git::Check.allow_dirty = README.mkdn Git::Commit.allow_dirty = README.mkdn ; Verbatim tests have trailing whitespace (in pod and and heredocs). Test::EOL.trailing_whitespace = 0 [Prereqs] ; this could be RuntimeRecommends if it causes a problem Pod::ParseLink = 1.10 Pod-Markdown-1.500/Changes0000644000175000017500000001172312243671303014311 0ustar randorandoRevision history for Perl extension Pod-Markdown 1.500 2013-11-22T15:05:31Z - Format url fragments (in links to perldoc sections) according to the destination site (perldoc_url_prefix). This makes links to sections work where they probably never did before. They are also customizable. - Use multiple backticks to delimit code spans that contain literal backticks. 1.401 2013-11-06T05:30:55Z - Require Pod::Parser 1.51 for bug fixes. 1.400 2013-11-05T14:18:19Z [Output Changes] - Change perldoc urls to point to metacpan. [Bug Fixes] - Recognize numbered pod items that do not have a period. Thanks to Yasutaka ATARASHI for the pull request (gh-4). - Remove extraneous blank line between verbatim paragraphs. Thanks to Graham Ollis for the pull request (gh-5). - Do not escape markdown characters inside links (or file paths). Thanks to Taiki Kawakami for the pull request (gh-6). 1.322 2012-11-17T15:51:36Z - Fix incorrect escaping of characters that are inside inline code blocks in headers. Thanks to Peter Vereshagin for the pull req (gh-3). 1.321 2012-10-27T01:23:56Z - Improved list handling including support for ordered (numbered) and nested lists. Thanks to Yasutaka ATARASHI for the pull req (gh-2). 1.320 2012-04-30T23:30:11Z - End markdown output with a newline to be more consistent with... everything. If this causes a problem for you please report it. - Enable pod2markdown to accept file paths as arguments (for both input and output (defaulting to STDIN/STDOUT)). Thanks to Mike Doherty for the suggestion [rt-76726]. 1.301 2012-04-25T03:56:11Z - Fix double-interpolation of list headings which caused escaping of the markdown characters. Thanks to motemen for the pull request (gh-1). - Add TODO tests for improving list handling. 1.300000 2012-04-08T00:08:25Z - Document that characters in varbatim paragraphs and code sections are not escaped. - Bump release number to demonstrate major formatting difference of last change (backslash-escaped characters). (Forgot to do it last time.) 1.200001 2012-04-07T23:16:23Z - Escape characters that are special to Markdown (but normal in Pod) with backslashes. Thanks to Florian (fschlich at zedat dot fu-berlin dot de) for the initial patch (rt-75620). 1.200000 2011-11-28T17:57:01Z [Enhancements] - Handle POD formatting codes embedded in links - Render Z<> and X<> as blank strings - Handle numeric (hex, octal, and decimal) E<> escapes - Convert spaces in S<> to   [Format Changes] - S<> no longer produces backticks (code sections). This is consistent with perlpod and perlpodspec. Use something like S> if you intend it to be treated as code. - Author meta tag with no title meta tag does not produce a leading newline. This was considered a bug. [Tests] - More tests, increased coverage 1.120001 2011-11-27T04:07:30Z [Prereqs] - Require version 1.10 of Pod::ParseLink (core in perl 5.12) to handle alt text with schemes/absolute URLs. This can be changed from "requires" to "recommends" if it poses a problem. [Test Fix] - Skip tests (rather than fail) for alt text with absolute url if Pod::ParseLink < 1.10 1.120000 2011-11-19T05:44:51Z [Enhancements] - Use Pod::ParseLink to dramatically improve (and simplify) link parsing (including sections, alternate text, and man pages). [Format Change] - NOTE: L now becomes ["foo"](#foo) instead of [foo](#pod_foo). This is consistent with perldoc, perlpodspec, and Pod::Simple::(X)HTML which is used for metacpan.org and search.cpan.org. No '#pod_' id/name attributes were ever generated so the links probably weren't very useful (and probably still aren't). If this change presents a problem please report it. 1.110732 2011-11-18T04:06:06Z - Change /\h/ to /[ \t]/ for compatibility with older perls. Thanks to David Golden for reporting [rt-71961] 1.110731 2011-11-18T03:28:34Z - Ensure verbatim pod becomes verbatim markdown by increasing indentation if necessary [rt-72414] - Co-maintainership granted to RWSTAUNER 1.110730 2011-03-14 10:11:52 Europe/Vienna - make bulleted lists work at least minimally (thanks ap) 1.103491 2010-12-15 23:03:02 Europe/Vienna - added Ryan C. Thompson's email address 1.103490 2010-12-15 16:12:31 Europe/Vienna - improved L<> link handling - Enabled interpolation of I in headers 1.100860 2010-03-27 14:31:43 Europe/Vienna - converted the distribution to Dist::Zilla-style - bin/pod2markdown now uses '#!/usr/bin/env perl' 0.02 2009-10-04 16:30:06 CEST - E now outputs '&foo;' - only generate meta tags if asked to 0.01 2009-10-04T12:24:45Z (Marcel Gruenauer ) - original version