Hello community,
here is the log from the commit of package perl-Test-SharedFork for openSUSE:Factory checked in at 2013-01-02 13:00:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-SharedFork (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-SharedFork", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-SharedFork/perl-Test-SharedFork.changes 2012-02-20 16:16:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Test-SharedFork.new/perl-Test-SharedFork.changes 2013-01-02 13:00:20.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Dec 24 14:28:25 UTC 2012 - lars@linux-schulserver.de
+
+- update to 0.21:
+ + added --norc option for more portable testing
+- remove versioned dependency to Test::More as OBS currently
+ breaks with this
+
+-------------------------------------------------------------------
Old:
----
Test-SharedFork-0.20.tar.gz
New:
----
Test-SharedFork-0.21.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-SharedFork.spec ++++++
--- /var/tmp/diff_new_pack.nvFGEM/_old 2013-01-02 13:00:21.000000000 +0100
+++ /var/tmp/diff_new_pack.nvFGEM/_new 2013-01-02 13:00:21.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Test-SharedFork
-Version: 0.20
+Version: 0.21
Release: 0
%define cpan_name Test-SharedFork
Summary: Fork test
@@ -31,7 +31,7 @@
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(App::Prove)
-BuildRequires: perl(Test::More) >= 0.88
+BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Requires)
#BuildRequires: perl(inc::Module::Install)
#BuildRequires: perl(JSON)
@@ -47,7 +47,7 @@
#BuildRequires: perl(Test::SharedFork::Scalar)
#BuildRequires: perl(Test::SharedFork::Store)
#BuildRequires: perl(YAML::Tiny)
-Requires: perl(Test::More) >= 0.88
+Requires: perl(Test::More)
%{perl_requires}
%description
++++++ Test-SharedFork-0.20.tar.gz -> Test-SharedFork-0.21.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/Changes new/Test-SharedFork-0.21/Changes
--- old/Test-SharedFork-0.20/Changes 2012-02-10 00:58:59.000000000 +0100
+++ new/Test-SharedFork-0.21/Changes 2012-11-28 13:36:15.000000000 +0100
@@ -1,5 +1,13 @@
Revision history for Perl extension Test::SharedFork
+0.21
+
+ commit 8a94505105f87671ea03fed02eb6611bf7156e71
+ Author: tokuhirom
+ Date: Fri Nov 9 09:57:36 2012 +0900
+
+ t/10_subtest.t: added --norc option for more portable testing.
+
0.20
- test_requires Time::HiRes for redhat.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/META.yml new/Test-SharedFork-0.21/META.yml
--- old/Test-SharedFork-0.20/META.yml 2012-02-10 00:59:15.000000000 +0100
+++ new/Test-SharedFork-0.21/META.yml 2012-11-28 13:37:00.000000000 +0100
@@ -4,14 +4,14 @@
- 'Tokuhiro Matsuno <tokuhirom slkjfd gmail.com>'
build_requires:
App::Prove: 0
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
Test::Requires: 0
Time::HiRes: 0
configure_requires:
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.03'
+generated_by: 'Module::Install version 1.06'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,4 +27,4 @@
perl: 5.8.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.20
+version: 0.21
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Base.pm new/Test-SharedFork-0.21/inc/Module/Install/Base.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Base.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Base.pm 2012-11-28 13:36:59.000000000 +0100
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
}
# Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Can.pm new/Test-SharedFork-0.21/inc/Module/Install/Can.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Can.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Can.pm 2012-11-28 13:36:59.000000000 +0100
@@ -3,13 +3,12 @@
use strict;
use Config ();
-use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -29,7 +28,7 @@
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
-# check if we can run some command
+# Check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
@@ -38,14 +37,88 @@
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
- my $abs = File::Spec->catfile($dir, $_[1]);
+ require File::Spec;
+ my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+ my $self = shift;
+
+ # Ensure we have the CBuilder module
+ $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+ # Do we have the configure_requires checker?
+ local $@;
+ eval "require ExtUtils::CBuilder;";
+ if ( $@ ) {
+ # They don't obey configure_requires, so it is
+ # someone old and delicate. Try to avoid hurting
+ # them by falling back to an older simpler test.
+ return $self->can_cc();
+ }
+
+ # Do we have a working C compiler
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ unless ( $builder->have_compiler ) {
+ # No working C compiler
+ return 0;
+ }
+
+ # Write a C file representative of what XS becomes
+ require File::Temp;
+ my ( $FH, $tmpfile ) = File::Temp::tempfile(
+ "compilexs-XXXXX",
+ SUFFIX => '.c',
+ );
+ binmode $FH;
+ print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+int boot_sanexs() {
+ return 1;
+}
+
+END_C
+ close $FH;
+
+ # Can the C compiler access the same headers XS does
+ my @libs = ();
+ my $object = undef;
+ eval {
+ local $^W = 0;
+ $object = $builder->compile(
+ source => $tmpfile,
+ );
+ @libs = $builder->link(
+ objects => $object,
+ module_name => 'sanexs',
+ );
+ };
+ my $result = $@ ? 0 : 1;
+
+ # Clean up all the build files
+ foreach ( $tmpfile, $object, @libs ) {
+ next unless defined $_;
+ 1 while unlink;
+ }
+
+ return $result;
+}
+
+# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@
__END__
-#line 156
+#line 236
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Fetch.pm new/Test-SharedFork-0.21/inc/Module/Install/Fetch.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Fetch.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Fetch.pm 2012-11-28 13:36:59.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Makefile.pm new/Test-SharedFork-0.21/inc/Module/Install/Makefile.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Makefile.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Makefile.pm 2012-11-28 13:36:59.000000000 +0100
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -215,18 +215,22 @@
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
- # MakeMaker can complain about module versions that include
- # an underscore, even though its own version may contain one!
- # Hence the funny regexp to get rid of it. See RT #35800
- # for details.
- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
- $self->build_requires( 'ExtUtils::MakeMaker' => $v );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+ # This previous attempted to inherit the version of
+ # ExtUtils::MakeMaker in use by the module author, but this
+ # was found to be untenable as some authors build releases
+ # using future dev versions of EU:MM that nobody else has.
+ # Instead, #toolchain suggests we use 6.59 which is the most
+ # stable version on CPAN at time of writing and is, to quote
+ # ribasushi, "not terminally fucked, > and tested enough".
+ # TODO: We will now need to maintain this over time to push
+ # the version up as new versions are released.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
}
# Generate the MakeMaker params
@@ -241,7 +245,6 @@
'all_from' if you prefer) in Makefile.PL.
EOT
- $DB::single = 1;
if ( $self->tests ) {
my @tests = split ' ', $self->tests;
my %seen;
@@ -412,4 +415,4 @@
__END__
-#line 541
+#line 544
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Metadata.pm new/Test-SharedFork-0.21/inc/Module/Install/Metadata.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Metadata.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Metadata.pm 2012-11-28 13:36:59.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/Win32.pm new/Test-SharedFork-0.21/inc/Module/Install/Win32.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/Win32.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/Win32.pm 2012-11-28 13:36:59.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install/WriteAll.pm new/Test-SharedFork-0.21/inc/Module/Install/WriteAll.pm
--- old/Test-SharedFork-0.20/inc/Module/Install/WriteAll.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install/WriteAll.pm 2012-11-28 13:36:59.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.03';
+ $VERSION = '1.06';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Module/Install.pm new/Test-SharedFork-0.21/inc/Module/Install.pm
--- old/Test-SharedFork-0.20/inc/Module/Install.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Module/Install.pm 2012-11-28 13:36:59.000000000 +0100
@@ -31,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.03';
+ $VERSION = '1.06';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -451,7 +451,7 @@
}
sub _cmp ($$) {
- _version($_[0]) <=> _version($_[1]);
+ _version($_[1]) <=> _version($_[2]);
}
# Cloned from Params::Util::_CLASS
@@ -467,4 +467,4 @@
1;
-# Copyright 2008 - 2011 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/inc/Pod/Markdown.pm new/Test-SharedFork-0.21/inc/Pod/Markdown.pm
--- old/Test-SharedFork-0.20/inc/Pod/Markdown.pm 2012-02-10 00:59:14.000000000 +0100
+++ new/Test-SharedFork-0.21/inc/Pod/Markdown.pm 2012-11-28 13:36:59.000000000 +0100
@@ -1,14 +1,29 @@
#line 1
+# vim: set ts=4 sts=4 sw=4 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.321';
+}
+# git description: v1.320-6-g35fc58e
+
BEGIN {
- $Pod::Markdown::VERSION = '1.110730';
+ $Pod::Markdown::AUTHORITY = 'cpan:RWSTAUNER';
}
# ABSTRACT: Convert POD to Markdown
use parent qw(Pod::Parser);
+use Pod::ParseLink (); # core
sub initialize {
my $self = shift;
@@ -24,6 +39,7 @@
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
};
@@ -37,26 +53,27 @@
if ($args{with_meta}) {
@header = $parser->_build_markdown_head;
}
- join("\n" x 2, @header, @{$lines});
+ join("\n" x 2, @header, @{$lines}) . "\n";
}
sub _build_markdown_head {
my $parser = shift;
my $data = $parser->_private;
- my $paragraph = '';
- if (defined $data->{Title}) {
- $paragraph .= sprintf '[[meta title="%s"]]', $data->{Title};
- }
- if (defined $data->{Author}) {
- $paragraph .= "\n" . sprintf '[[meta author="%s"]]', $data->{Author};
- }
- return $paragraph;
+ 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) = @_;
+ my ($parser, $text, $prelisthead) = @_;
my $data = $parser->_private;
- $text = $parser->_indent_text($text);
+ $text = $parser->_indent_text($text, defined($prelisthead));
+ $text = $prelisthead."\n".$text if defined $prelisthead && $prelisthead ne '';
push @{ $data->{Text} }, $text;
return;
}
@@ -68,13 +85,11 @@
}
sub _indent_text {
- my ($parser, $text) = @_;
+ my ($parser, $text, $listhead) = @_;
my $data = $parser->_private;
my $level = $data->{Indent};
+ --$level if $listhead;
my $indent = undef;
- if ($level > 0) {
- $level--;
- }
$indent = ' ' x ($level * 4);
my @lines = map { $indent . $_; } split(/\n/, $text);
return wantarray ? @lines : join("\n", @lines);
@@ -83,9 +98,25 @@
sub _clean_text {
my $text = $_[1];
my @trimmed = grep { $_; } split(/\n/, $text);
+
return wantarray ? @trimmed : join("\n", @trimmed);
}
+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 $_;
+}
+
sub command {
my ($parser, $command, $paragraph, $line_num) = @_;
my $data = $parser->_private;
@@ -97,6 +128,7 @@
if ($command =~ m{head(\d)}xms) {
my $level = $1;
+ $paragraph = $parser->_escape($paragraph);
$paragraph = $parser->interpolate($paragraph, $line_num);
# the headers never are indented
@@ -117,16 +149,27 @@
# update indent level
$data->{Indent}++;
+ push @{$data->{sstack}}, $data->{searching};
- # closing a list ?
+ # closing a list ?
} elsif ($command =~ m{back}xms) {
# decrement indent level
$data->{Indent}--;
- $data->{searching} = '';
+ $data->{searching} = pop @{$data->{sstack}};
+
} elsif ($command =~ m{item}xms) {
- $paragraph = $parser->interpolate($paragraph, $line_num);
- $paragraph =~ s{^\h* \* \h*}{}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';
@@ -146,14 +189,50 @@
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;
+ }
+
$parser->_save($paragraph);
}
+sub _escape_non_code {
+ my ($parser, $text, $ptree) = @_;
+ $text = $parser->_escape($text)
+ unless $ptree->isa('Pod::InteriorSequence') && $ptree->cmd_name eq 'C';
+ return $text;
+}
+
sub textblock {
my ($parser, $paragraph, $line_num) = @_;
my $data = $parser->_private;
+ my $prelisthead;
- # interpolate the paragraph for embebed sequences
+ # 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);
# clean the empty lines
@@ -167,7 +246,10 @@
my $is_huddled = $1;
$paragraph = sprintf '%s %s', $data->{ListType}, $paragraph;
if ($is_huddled) {
- $paragraph = $parser->_unsave() . "\n" . $paragraph;
+ # 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') {
@@ -175,52 +257,96 @@
}
# save the text
- $parser->_save($paragraph);
+ $parser->_save($paragraph, $prelisthead);
}
sub interior_sequence {
- my ($seq_command, $seq_argument, $pod_seq) = @_[1..3];
+ 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 '_' . $_[1] . '_' }, # italic
- 'B' => sub { return '__' . $_[1] . '__' }, # bold
- 'C' => sub { return '`' . $_[1] . '`' }, # monospace
- 'F' => sub { return '`' . $_[1] . '`' }, # system path
- 'S' => sub { return '`' . $_[1] . '`' }, # code
+ 'I' => sub { return '_' . $_[$i] . '_' }, # italic
+ 'B' => sub { return '__' . $_[$i] . '__' }, # bold
+ 'C' => sub { return '`' . $_[$i] . '`' }, # monospace
+ 'F' => sub { return '`' . $_[$i] . '`' }, # system path
+ # non-breaking space
+ 'S' => sub {
+ (my $s = $_[$i]) =~ s/ / /g;
+ return $s;
+ },
'E' => sub {
- my $charname = $_[1];
+ 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,
+ 'X' => sub { '' },
+ 'Z' => sub { '' },
);
if (exists $interiors{$seq_command}) {
my $code = $interiors{$seq_command};
- return $code->($seq_command, $seq_argument, $pod_seq);
+ return $code->($self, $seq_command, $seq_argument, $pod_seq);
} else {
return sprintf '%s<%s>', $seq_command, $seq_argument;
}
}
sub _resolv_link {
- my ($cmd, $arg) = @_;
- my $text = $arg =~ s"^(.+?)\|"" ? $1 : '';
+ my ($self, $cmd, $arg) = @_;
- if ($arg =~ m{^http|ftp}xms) { # direct link to a URL
- $text ||= $arg;
- return sprintf '[%s](%s)', $text, $arg;
- } elsif ($arg =~ m{^/(.*)$}) {
- $text ||= $1;
- $text = $1;
- return "[$text](\#pod_$1)";
- } elsif ($arg =~ m{^(\w+(?:::\w+)*)$}) {
- $text ||= $1;
- return "[$text](http://search.cpan.org/perldoc?$1)";
+ 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 = '';
+
+ # TODO: make url prefixes configurable
+
+ if ($type eq 'url') {
+ $url = $name;
+ } elsif ($type eq 'man') {
+ # stolen from Pod::Simple::(X)HTML
+ my ($page, $part) = $name =~ /\A([^(]+)(?:[(](\S*)[)])?/;
+ $url = 'http://man.he.net/man' . ($part || 1) . '/' . ($page || $name);
} else {
+ if ($name) {
+ $url = 'http://search.cpan.org/perldoc?' . $name;
+ }
+ if ($section){
+ # TODO: sites/pod formatters differ on how to transform the section
+ # TODO: we could do it according to specified url prefix or pod formatter
+ # TODO: or allow a coderef?
+ # TODO: (Pod::Simple::XHTML:idify() for metacpan)
+ # TODO: (Pod::Simple::HTML section_escape/unicode_escape_url/section_url_escape for s.c.o.)
+ $url .= '#' . $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;
}
+
+ return sprintf '[%s](%s)', ($text || $inferred), $url;
}
sub format_header {
@@ -230,7 +356,6 @@
1;
-
__END__
-#line 341
+#line 546
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/lib/Test/SharedFork.pm new/Test-SharedFork-0.21/lib/Test/SharedFork.pm
--- old/Test-SharedFork-0.20/lib/Test/SharedFork.pm 2012-02-10 00:58:37.000000000 +0100
+++ new/Test-SharedFork-0.21/lib/Test/SharedFork.pm 2012-11-28 13:36:38.000000000 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use base 'Test::Builder::Module';
-our $VERSION = '0.20';
+our $VERSION = '0.21';
use Test::Builder 0.32; # 0.32 or later is needed
use Test::SharedFork::Scalar;
use Test::SharedFork::Array;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-SharedFork-0.20/t/10_subtest.t new/Test-SharedFork-0.21/t/10_subtest.t
--- old/Test-SharedFork-0.20/t/10_subtest.t 2011-10-03 10:27:43.000000000 +0200
+++ new/Test-SharedFork-0.21/t/10_subtest.t 2012-11-28 13:07:47.000000000 +0100
@@ -8,7 +8,7 @@
TODO: {
local $TODO = 'subtest is not supported yet';
my $prove = App::Prove->new();
- $prove->process_args('-Ilib', 't/nest/subtest.ttt');
+ $prove->process_args('--norc', '-Ilib', 't/nest/subtest.ttt');
ok(!$prove->run(), 'this test should fail');
};
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org