Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

resolve ext/B/B.pm merge conflict

  • Loading branch information...
commit 3204ca7c32b9e1de9e0e0730b507a718046d2215 2 parents de31604 + f6e302c
@rurban authored
Showing with 10,039 additions and 3,433 deletions.
  1. +3 −0  Configure
  2. +7 −0 MANIFEST
  3. +8 −8 Makefile.SH
  4. +4 −3 Porting/Maintainers.pl
  5. +22 −7 Porting/bisect-runner.pl
  6. +1 −0  Porting/checkAUTHORS.pl
  7. +2 −0  Porting/pod_lib.pl
  8. +19 −25 Porting/release_schedule.pod
  9. +1 −1  config_h.SH
  10. +4 −4 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm
  11. +15 −0 cpan/CPAN-Meta/Changes
  12. +2 −2 cpan/CPAN-Meta/lib/CPAN/Meta.pm
  13. +15 −12 cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
  14. +2 −2 cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
  15. +3 −3 cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
  16. +2 −2 cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
  17. +2 −2 cpan/CPAN-Meta/lib/CPAN/Meta/Requirements.pm
  18. +5 −5 cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
  19. +2 −2 cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
  20. +1 −1  cpan/DB_File/t/db-btree.t
  21. +1 −1  cpan/List-Util/ListUtil.xs
  22. +8 −0 cpan/Version-Requirements/Changes
  23. +6 −3 cpan/Version-Requirements/lib/Version/Requirements.pm
  24. +1 −1  cpan/autodie/t/backcompat.t
  25. +20 −9 dist/Carp/lib/Carp.pm
  26. +1 −1  dist/Carp/lib/Carp/Heavy.pm
  27. +13 −13 dist/Carp/t/Carp.t
  28. +5 −1 dist/Carp/t/heavy.t
  29. +5 −0 dist/Carp/t/swash.t
  30. +6 −11 dist/Carp/t/vivify_gv.t
  31. +9 −0 dist/Carp/t/vivify_stash.t
  32. +9 −0 dist/Carp/t/with_warnings.t
  33. +2 −1  dist/Cwd/Cwd.pm
  34. +5 −4 dist/Data-Dumper/Dumper.pm
  35. +7 −4 dist/Data-Dumper/Dumper.xs
  36. +18 −2 dist/Data-Dumper/t/dumper.t
  37. +24 −0 dist/Data-Dumper/t/qr.t
  38. +34 −0 ext/B/t/pollute.t
  39. +1 −1  ext/Hash-Util/t/Util.t
  40. +17 −12 ext/PerlIO-scalar/t/scalar.t
  41. +145 −36 ext/Pod-Html/lib/Pod/Html.pm
  42. +3 −0  ext/Pod-Html/t/cache.pod
  43. +71 −0 ext/Pod-Html/t/cache.t
  44. +1 −0  ext/Pod-Html/t/pod2html-lib.pl
  45. +22 −31 ext/XS-Typemap/Typemap.xs
  46. +65 −45 ext/XS-Typemap/t/Typemap.t
  47. +1 −5 ext/re/re.pm
  48. +10 −1 ext/re/t/re.t
  49. +2 −2 l1_char_class_tab.h
  50. +0 −7 lib/ExtUtils/typemap
  51. +294 −213 lib/Unicode/UCD.pm
  52. +229 −134 lib/Unicode/UCD.t
  53. +43 −427 lib/_charnames.pm
  54. +24 −113 lib/charnames.pm
  55. +13 −4 lib/charnames.t
  56. +167 −120 lib/unicore/ArabicShaping.txt
  57. +21 −7 lib/unicore/BidiMirroring.txt
  58. +14 −3 lib/unicore/Blocks.txt
  59. +4 −3 lib/unicore/CJKRadicals.txt
  60. +17 −4 lib/unicore/CaseFolding.txt
  61. +6 −7 lib/unicore/CompositionExclusions.txt
  62. +128 −8 lib/unicore/DAge.txt
  63. +726 −180 lib/unicore/DCoreProperties.txt
  64. +321 −60 lib/unicore/DNormalizationProps.txt
  65. +737 −7 lib/unicore/EastAsianWidth.txt
  66. +6 −3 lib/unicore/EmojiSources.txt
  67. +3 −3 lib/unicore/HangulSyllableType.txt
  68. +29 −3 lib/unicore/Index.txt
  69. +32 −4 lib/unicore/IndicMatraCategory.txt
  70. +44 −5 lib/unicore/IndicSyllabicCategory.txt
  71. +8 −8 lib/unicore/Jamo.txt
  72. +862 −132 lib/unicore/LineBreak.txt
  73. +486 −18 lib/unicore/NameAliases.txt
  74. +10 −3 lib/unicore/NamedSequences.txt
  75. +4 −9 lib/unicore/NamedSqProv.txt
  76. +1,361 −42 lib/unicore/NamesList.txt
  77. +5 −5 lib/unicore/NormalizationCorrections.txt
  78. +120 −39 lib/unicore/PropList.txt
  79. +859 −757 lib/unicore/PropValueAliases.txt
  80. +120 −118 lib/unicore/PropertyAliases.txt
  81. +3 −3 lib/unicore/ReadMe.txt
  82. +44 −9 lib/unicore/ScriptExtensions.txt
  83. +186 −64 lib/unicore/Scripts.txt
  84. +6 −4 lib/unicore/SpecialCasing.txt
  85. +229 −7 lib/unicore/StandardizedVariants.txt
  86. +765 −34 lib/unicore/UnicodeData.txt
  87. +100 −50 lib/unicore/auxiliary/GCBTest.txt
  88. +52 −39 lib/unicore/auxiliary/GraphemeBreakProperty.txt
  89. +125 −32 lib/unicore/auxiliary/SentenceBreakProperty.txt
  90. +112 −24 lib/unicore/auxiliary/WordBreakProperty.txt
  91. +201 −72 lib/unicore/extracted/DBidiClass.txt
  92. +5 −5 lib/unicore/extracted/DBinaryProperties.txt
  93. +193 −94 lib/unicore/extracted/DCombiningClass.txt
  94. +48 −13 lib/unicore/extracted/DDecompositionType.txt
  95. +133 −50 lib/unicore/extracted/DEastAsianWidth.txt
  96. +230 −103 lib/unicore/extracted/DGeneralCategory.txt
  97. +29 −13 lib/unicore/extracted/DJoinGroup.txt
  98. +38 −9 lib/unicore/extracted/DJoinType.txt
  99. +196 −93 lib/unicore/extracted/DLineBreak.txt
  100. +19 −6 lib/unicore/extracted/DNumType.txt
Sorry, we could not display the entire diff because it was too big.
View
3  Configure
@@ -819,6 +819,7 @@ d_semctl_semun=''
d_union_semun=''
d_unordered=''
d_unsetenv=''
+d_userelocatableinc=''
d_usleep=''
d_usleepproto=''
d_ustat=''
@@ -6161,6 +6162,7 @@ y|Y) val="$define" ;;
esac
set userelocatableinc
eval $setvar
+d_userelocatableinc="$userelocatableinc"
initialinstalllocation="$binexp"
: Default prefix is now "up one level from where the binaries are"
@@ -23186,6 +23188,7 @@ d_uname='$d_uname'
d_union_semun='$d_union_semun'
d_unordered='$d_unordered'
d_unsetenv='$d_unsetenv'
+d_userelocatableinc='$d_userelocatableinc'
d_usleep='$d_usleep'
d_usleepproto='$d_usleepproto'
d_ustat='$d_ustat'
View
7 MANIFEST
@@ -3051,7 +3051,10 @@ dist/Carp/lib/Carp.pm Error message extension
dist/Carp/Makefile.PL makefile writer for Carp
dist/Carp/t/Carp.t See if Carp works
dist/Carp/t/heavy.t See if Carp::Heavy works
+dist/Carp/t/swash.t See if Carp avoids breaking swash loading
dist/Carp/t/vivify_gv.t See if Carp leaves utf8:: stuff alone
+dist/Carp/t/vivify_stash.t See if Carp leaves utf8:: stash alone
+dist/Carp/t/with_warnings.t See if Carp plays nicely with warnings
dist/constant/lib/constant.pm For "use constant"
dist/constant/t/constant.t See if compile-time constants work
dist/constant/t/utf8.t Test Unicode constants under utf8 pragma
@@ -3086,6 +3089,7 @@ dist/Data-Dumper/Todo Data pretty printer, futures
dist/Data-Dumper/t/overload.t See if Data::Dumper works for overloaded data
dist/Data-Dumper/t/pair.t See if Data::Dumper pair separator works
dist/Data-Dumper/t/perl-74170.t Regression test for stack reallocation
+dist/Data-Dumper/t/qr.t See if Data::Dumper works with qr|/|
dist/Data-Dumper/t/terse.t See if Data::Dumper terse option works
dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm Generate stubs for SelfLoader.pm
dist/Devel-SelfStubber/t/Devel-SelfStubber.t See if Devel::SelfStubber works
@@ -3646,6 +3650,7 @@ ext/B/t/optree_sort.t inplace sort optimization regression
ext/B/t/optree_specials.t BEGIN, END, etc code
ext/B/t/optree_varinit.t my,our,local var init optimization
ext/B/t/o.t See if O works
+ext/B/t/pollute.t constants may not pollute the compiler
ext/B/t/pragma.t See if user pragmas work.
ext/B/t/showlex.t See if B::ShowLex works
ext/B/t/terse.t See if B::Terse works
@@ -3801,6 +3806,8 @@ ext/PerlIO-via/via.pm PerlIO layer for layers in perl
ext/PerlIO-via/via.xs PerlIO layer for layers in perl
ext/Pod-Html/bin/pod2html Translator to turn pod into HTML
ext/Pod-Html/lib/Pod/Html.pm Convert POD data to HTML
+ext/Pod-Html/t/cache.pod
+ext/Pod-Html/t/cache.t
ext/Pod-Html/t/crossref.pod
ext/Pod-Html/t/crossref.t
ext/Pod-Html/testdir/perlpodspec-copy.pod
View
16 Makefile.SH
@@ -1202,16 +1202,16 @@ manicheck: FORCE
# DynaLoader may be needed for extensions that use Makefile.PL.
$(DYNALOADER): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE $(nonxs_ext)
- $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
+ $(MINIPERL) make_ext.pl $@ MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
d_dummy $(dynamic_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT)
- $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
+ $(MINIPERL) make_ext.pl $@ MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
s_dummy $(static_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE
- $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
+ $(MINIPERL) make_ext.pl $@ MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
n_dummy $(nonxs_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
- $(MINIPERL) make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+ $(MINIPERL) make_ext.pl $@ MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL)
!NO!SUBS!
$spitshell >>$Makefile <<EOF
@@ -1269,7 +1269,7 @@ _tidy:
-cd x2p; $(LDLIBPTH) $(MAKE) clean
-rm -f lib/Config_git.pl git_version.h
-@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
- $(MINIPERL) make_ext.pl --target=clean $$x MAKE=$(MAKE) ; \
+ $(MINIPERL) make_ext.pl --target=clean $$x MAKE="$(MAKE)" ; \
done
_cleaner1:
@@ -1279,7 +1279,7 @@ _cleaner1:
-cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN)
-@if test -f $(MINIPERL_EXE) ; then \
for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
- $(MINIPERL) make_ext.pl --target=$(CLEAN) $$x MAKE=$(MAKE) ; \
+ $(MINIPERL) make_ext.pl --target=$(CLEAN) $$x MAKE="$(MAKE)" ; \
done ; \
else \
sh $(CLEAN).sh ; \
@@ -1378,7 +1378,7 @@ config.h: config_h.SH config.sh
.PHONY: depend
depend: makedepend
- sh ./makedepend MAKE=$(MAKE)
+ sh ./makedepend MAKE="$(MAKE)"
cd x2p; $(MAKE) depend
# Cannot postpone this until $firstmakefile is ready ;-)
@@ -1413,7 +1413,7 @@ test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
- $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
+ $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
test check: test_prep
View
7 Porting/Maintainers.pl
@@ -481,7 +481,7 @@ package Maintainers;
'CPAN::Meta' => {
'MAINTAINER' => 'dagolden',
- 'DISTRIBUTION' => 'RJBS/CPAN-Meta-2.113640.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-2.120351.tar.gz',
'FILES' => q[cpan/CPAN-Meta],
'EXCLUDED' => [
qw(t/00-compile.t),
@@ -493,9 +493,10 @@ package Maintainers;
'CPAN::Meta::YAML' => {
'MAINTAINER' => 'dagolden',
- 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.005.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.006.tar.gz',
'FILES' => q[cpan/CPAN-Meta-YAML],
'EXCLUDED' => [
+ 't/00-compile.t',
't/04_scalar.t', # requires YAML.pm
qr{^xt},
],
@@ -1959,7 +1960,7 @@ package Maintainers;
'Version::Requirements' => {
'MAINTAINER' => 'rjbs',
- 'DISTRIBUTION' => 'RJBS/Version-Requirements-0.101021.tar.gz',
+ 'DISTRIBUTION' => 'RJBS/Version-Requirements-0.101022.tar.gz',
'FILES' => q[cpan/Version-Requirements],
'EXCLUDED' => ['t/release-pod-syntax.t'],
'UPSTREAM' => 'cpan',
View
29 Porting/bisect-runner.pl
@@ -53,7 +53,6 @@
(
usedevel => '',
optimize => '-g',
- cc => (`ccache --version`, $?) ? 'cc' : 'ccache cc',
ld => 'cc',
($linux64 ? (libpth => \@paths) : ()),
);
@@ -61,7 +60,7 @@
unless(GetOptions(\%options,
'target=s', 'make=s', 'jobs|j=i', 'expect-pass=i',
'expect-fail' => sub { $options{'expect-pass'} = 0; },
- 'clean!', 'one-liner|e=s', 'l', 'w', 'match=s',
+ 'clean!', 'one-liner|e=s', 'c', 'l', 'w', 'match=s',
'no-match=s' => sub {
$options{match} = $_[1];
$options{'expect-pass'} = 0;
@@ -88,7 +87,7 @@
@ARGV = ('sh', '-c', 'cd t && ./perl TEST base/*.t')
if $options{validate} && !@ARGV;
-pod2usage(exitval => 0, verbose => 1) if $options{usage};
+pod2usage(exitval => 0, verbose => 2) if $options{usage};
pod2usage(exitval => 255, verbose => 1)
unless @ARGV || $match || $options{'test-build'} || defined $options{'one-liner'};
pod2usage(exitval => 255, verbose => 1)
@@ -284,6 +283,12 @@ =head1 OPTIONS
=item *
+-c
+
+Add C<-c> to the command line, to cause perl to exit after syntax checking.
+
+=item *
+
-l
Add C<-l> to the command line with C<-e>
@@ -300,8 +305,8 @@ =head1 OPTIONS
Add C<-w> to the command line with C<-e>
-It's not valid to pass C<-l> or C<-w> to C<bisect.pl> unless you are also
-using C<-e>
+It's not valid to pass C<-c>, C<-l> or C<-w> to C<bisect.pl> unless you are
+also using C<-e>
=item *
@@ -512,6 +517,15 @@ =head1 OPTIONS
die "$0: Can't build $target" if defined $target && !grep {@targets} $target;
+unless (exists $defines{cc}) {
+ # If it fails, the heuristic of 63f9ec3008baf7d6 is noisy, and hence
+ # confusing. Additionally, it doesn't correctly cope with ccache 2.4
+ # FIXME - really it should be replaced with a proper test of
+ # "can we build something?" and a helpful diagnostic if we can't.
+ # For now, simply move it here.
+ $defines{cc} = (`ccache --version`, $?) ? 'cc' : 'ccache cc';
+}
+
$j = "-j$j" if $j =~ /\A\d+\z/;
if (exists $options{make}) {
@@ -1045,8 +1059,9 @@ sub match_and_exit {
if (defined $options{'one-liner'}) {
my $exe = $target =~ /^(?:perl$|test)/ ? 'perl' : 'miniperl';
unshift @ARGV, '-e', $options{'one-liner'};
- unshift @ARGV, '-l' if $options{l};
- unshift @ARGV, '-w' if $options{w};
+ foreach (qw(c l w)) {
+ unshift @ARGV, "-$_" if $options{$_};
+ }
unshift @ARGV, "./$exe", '-Ilib';
}
View
1  Porting/checkAUTHORS.pl
@@ -681,6 +681,7 @@ sub _raw_address {
lutherh\100stratcom.com lutherh\100infinet.com
mab\100wdl.loral.com markb\100rdcf.sm.unisys.com
marcel\100codewerk.com gr\100univie.ac.at
+marcgreen\100cpan.org marcgreen\100wpi.edu
mark.p.lutz\100boeing.com tecmpl1\100triton.ca.boeing.com
marnix\100gmail.com pttesac!marnix!vanam
marty+p5p\100kasei.com marty\100martian.org
View
2  Porting/pod_lib.pl
@@ -86,6 +86,7 @@ sub pods_to_install {
sub is_duplicate_pod {
my $file = shift;
+ local $_;
# Initialise the list of possible source files on the first call.
unless (%Lengths) {
@@ -229,6 +230,7 @@ sub get_pod_metadata {
my $permit_missing_generated = shift;
# Do they want a consistency report?
my $callback = shift;
+ local $_;
__prime_state() unless $state{master};
return \%state unless $callback;
View
44 Porting/release_schedule.pod
@@ -26,20 +26,20 @@ Release schedule (with release manager):
Release schedule (with release managers):
2011-05-14 5.14.0 (final) Jesse Vincent
- 2011-06-16 5.14.1 Jesse Vincent
- 2011-09-14 5.14.2 Florian Ragwitz
- 2012-0?-?? 5.14.3 Ricardo Signes
+ 2011-06-16 5.14.1 Jesse Vincent
+ 2011-09-14 5.14.2 Florian Ragwitz
+ 2012-0?-?? 5.14.3 Ricardo Signes
????-??-?? 5.14.4 ??
=head2 Perl 5.12
Release schedule (with release managers):
- 2010-04-12 5.12.0 Jesse Vincent
- 2010-05-16 5.12.1 Jesse Vincent
- 2010-09-06 5.12.2 Jesse Vincent
- 2011-01-21 5.12.3 Ricardo Signes
- 2011-06-20 5.12.4 Leon Brocard
+ 2010-04-12 5.12.0 Jesse Vincent
+ 2010-05-16 5.12.1 Jesse Vincent
+ 2010-09-06 5.12.2 Jesse Vincent
+ 2011-01-21 5.12.3 Ricardo Signes
+ 2011-06-20 5.12.4 Leon Brocard
????-??-?? 5.12.5 ??
=head1 DEVELOPMENT RELEASE SCHEDULE
@@ -60,23 +60,24 @@ you should reset the version numbers to the next blead series.
Release schedule (with release managers and code freeze points):
- 2011-06-20 5.15.0 David Golden
- 2011-07-20 5.15.1 Zefram
- 2011-08-20 5.15.2 Ricardo Signes
- 2011-09-20 5.15.3 Stevan Little
- 2011-10-20 5.15.4 Florian Ragwitz
- 2011-11-20 5.15.5 Steve Hay
- 2011-12-20 5.15.6 Dave Rolsky (Contentious code freeze)
- 2012-01-20 5.15.7 Chris Williams
+ 2011-06-20 5.15.0 David Golden
+ 2011-07-20 5.15.1 Zefram
+ 2011-08-20 5.15.2 Ricardo Signes
+ 2011-09-20 5.15.3 Stevan Little
+ 2011-10-20 5.15.4 Florian Ragwitz
+ 2011-11-20 5.15.5 Steve Hay
+ 2011-12-20 5.15.6 Dave Rolsky (Contentious code freeze)
+ 2012-01-20 5.15.7 Chris Williams
2012-02-20 5.15.8 Max Maischein (User-visible code freeze)
2012-03-20 5.15.9 Abigail (Full code freeze)
+
+=head2 Perl 5.17
+
2012-04-20 5.17.0 Dave Cross
2012-05-20 5.17.1
2012-06-20 5.17.2
2012-07-20 5.17.3
-
-
=head1 VICTIMS
The following porters have all consented to do at least
@@ -106,13 +107,6 @@ Abigail <abigail@abigail.be>
Max Maischein <corion@cpan.org>
Dave Cross <dave@perlhacks.com>
-=head2 Reticent victims
-
-These folks have said that they'd be willing to release Perl but would
-prefer that others have the opportunity before they pitch in:
-
-(none at this time)
-
=head1 AUTHOR
Jesse Vincent <jesse@cpan.org>
View
2  config_h.SH
@@ -995,7 +995,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#define BIN "$bin" /**/
#define BIN_EXP "$binexp" /**/
-#define PERL_RELOCATABLE_INC "$userelocatableinc" /**/
+#$d_userelocatableinc PERL_RELOCATABLE_INC /**/
/* INTSIZE:
* This symbol contains the value of sizeof(int) so that the C
View
8 cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm
@@ -1,6 +1,6 @@
package CPAN::Meta::YAML;
{
- $CPAN::Meta::YAML::VERSION = '0.005';
+ $CPAN::Meta::YAML::VERSION = '0.006';
}
use strict;
@@ -643,11 +643,11 @@ END_PERL
=head1 NAME
-CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files
+CPAN::Meta::YAML
=head1 VERSION
-version 0.005
+version 0.006
=head1 SYNOPSIS
@@ -674,7 +674,7 @@ This module implements a subset of the YAML specification for use in reading
and writing CPAN metadata files like F<META.yml> and F<MYMETA.yml>. It should
not be used for any other general YAML parsing or generation task.
-NOTE: META.yml (and MYMETA.yml) files should be UTF-8 encoded. Users are
+NOTE: F<META.yml> (and F<MYMETA.yml>) files should be UTF-8 encoded. Users are
responsible for proper encoding and decoding. In particular, the C<read> and
C<write> methods do B<not> support UTF-8 and should not be used.
View
15 cpan/CPAN-Meta/Changes
@@ -1,7 +1,22 @@
Revision history for CPAN-Meta
+2.120351 2012-02-03 23:01:45 America/New_York
+
+ [OTHER]
+
+ - Fixed CPAN packaging errors
+
+2.120350 2012-02-03 22:46:59 America/New_York
+
+ [BUGFIX]
+
+ - Work around a memory leak bug involving version objects
+ in boolean context.
+
2.113640 2011-12-30 15:19:46 America/New_York
+ [OTHER]
+
- Version::Requirements has now been merged as CPAN::Meta::Requirements,
rendering Version::Requirements itself redundant
View
4 cpan/CPAN-Meta/lib/CPAN/Meta.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
use Carp qw(carp croak);
@@ -346,7 +346,7 @@ CPAN::Meta - the distribution metadata for a CPAN dist
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 SYNOPSIS
View
27 cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Converter;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
use CPAN::Meta::Validator;
@@ -316,7 +316,10 @@ sub _clean_version {
return 0 if ! length $element;
return 0 if ( $element eq 'undef' || $element eq '<undef>' );
- if ( my $v = eval { version->new($element) } ) {
+ my $v = eval { version->new($element) };
+ # XXX check defined $v and not just $v because version objects leak memory
+ # in boolean context -- dagolden, 2012-02-03
+ if ( defined $v ) {
return $v->is_qv ? $v->normal : $element;
}
else {
@@ -326,7 +329,7 @@ sub _clean_version {
sub _version_map {
my ($element) = @_;
- return undef unless defined $element;
+ return unless defined $element;
if ( ref $element eq 'HASH' ) {
my $new_map = {};
for my $k ( keys %$element ) {
@@ -444,7 +447,7 @@ sub _extract_prereqs {
sub _downgrade_optional_features {
my (undef, undef, $meta) = @_;
- return undef unless exists $meta->{optional_features};
+ return unless exists $meta->{optional_features};
my $origin = $meta->{optional_features};
my $features = {};
for my $name ( keys %$origin ) {
@@ -465,7 +468,7 @@ sub _downgrade_optional_features {
sub _upgrade_optional_features {
my (undef, undef, $meta) = @_;
- return undef unless exists $meta->{optional_features};
+ return unless exists $meta->{optional_features};
my $origin = $meta->{optional_features};
my $features = {};
for my $name ( keys %$origin ) {
@@ -561,7 +564,7 @@ my $resource2_upgrade = {
return unless $item;
if ( $item =~ m{^mailto:(.*)$} ) { return { mailto => $1 } }
elsif( _is_urlish($item) ) { return { web => $item } }
- else { return undef }
+ else { return }
},
repository => sub { return _is_urlish($_[0]) ? { url => $_[0] } : undef },
':custom' => \&_prefix_custom,
@@ -569,7 +572,7 @@ my $resource2_upgrade = {
sub _upgrade_resources_2 {
my (undef, undef, $meta, $version) = @_;
- return undef unless exists $meta->{resources};
+ return unless exists $meta->{resources};
return _convert($meta->{resources}, $resource2_upgrade);
}
@@ -607,7 +610,7 @@ my $resources2_cleanup = {
sub _cleanup_resources_2 {
my ($resources, $key, $meta, $to_version) = @_;
- return undef unless $resources && ref $resources eq 'HASH';
+ return unless $resources && ref $resources eq 'HASH';
return _convert($resources, $resources2_cleanup, $to_version);
}
@@ -621,7 +624,7 @@ my $resource1_spec = {
sub _resources_1_3 {
my (undef, undef, $meta, $version) = @_;
- return undef unless exists $meta->{resources};
+ return unless exists $meta->{resources};
return _convert($meta->{resources}, $resource1_spec);
}
@@ -634,7 +637,7 @@ sub _resources_1_2 {
$resources->{license} = $meta->license_url
if _is_urlish($meta->{license_url});
}
- return undef unless keys %$resources;
+ return unless keys %$resources;
return _convert($resources, $resource1_spec);
}
@@ -648,7 +651,7 @@ my $resource_downgrade_spec = {
sub _downgrade_resources {
my (undef, undef, $meta, $version) = @_;
- return undef unless exists $meta->{resources};
+ return unless exists $meta->{resources};
return _convert($meta->{resources}, $resource_downgrade_spec);
}
@@ -1260,7 +1263,7 @@ CPAN::Meta::Converter - Convert CPAN distribution metadata structures
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 SYNOPSIS
View
4 cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Feature;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
use CPAN::Meta::Prereqs;
@@ -42,7 +42,7 @@ CPAN::Meta::Feature - an optional feature provided by a CPAN distribution
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 DESCRIPTION
View
6 cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::History;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
1;
@@ -20,7 +20,7 @@ CPAN::Meta::History - history of CPAN Meta Spec changes
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 DESCRIPTION
@@ -242,7 +242,7 @@ Added 'resources' field with subkeys 'homepage', 'license', and
=item *
-Added 'optional_features' field as an alterate under 'recommends'.
+Added 'optional_features' field as an alternate under 'recommends'.
Includes 'description', 'requires', 'build_requires', 'conflicts',
'requires_packages', 'requires_os' and 'excluded_os' as valid subkeys
View
4 cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Prereqs;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
use Carp qw(confess);
@@ -149,7 +149,7 @@ CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 DESCRIPTION
View
4 cpan/CPAN-Meta/lib/CPAN/Meta/Requirements.pm
@@ -1,7 +1,7 @@
use strict;
use warnings;
package CPAN::Meta::Requirements;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
# ABSTRACT: a set of version requirements for a CPAN dist
@@ -384,7 +384,7 @@ CPAN::Meta::Requirements - a set of version requirements for a CPAN dist
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 SYNOPSIS
View
10 cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Spec;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
1;
@@ -20,7 +20,7 @@ CPAN::Meta::Spec - specification for CPAN distribution metadata
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 SYNOPSIS
@@ -506,12 +506,12 @@ Valid subkeys are as follows:
=item file
A I<List> of relative paths to files. Paths B<must be> specified with
-unix convetions.
+unix conventions.
=item directory
A I<List> of relative paths to directories. Paths B<must be> specified
-with unix convetions.
+with unix conventions.
[ Note: previous editions of the spec had C<dir> instead of C<directory> ]
@@ -566,7 +566,7 @@ This entry is required and has the same structure as that of the
C<L</prereqs>> key. It provides a list of package requirements
that must be satisfied for the feature to be supported or enabled.
-There is one crucial restriction: the preqreqs of an optional feature
+There is one crucial restriction: the prereqs of an optional feature
B<must not> include C<configure> phase prereqs.
=back
View
4 cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Validator;
-our $VERSION = '2.113640'; # VERSION
+our $VERSION = '2.120351'; # VERSION
#--------------------------------------------------------------------------#
@@ -838,7 +838,7 @@ CPAN::Meta::Validator - validate CPAN distribution metadata structures
=head1 VERSION
-version 2.113640
+version 2.120351
=head1 SYNOPSIS
View
2  cpan/DB_File/t/db-btree.t
@@ -566,7 +566,7 @@ sub ArrayCompare
return 0 if @$a != @$b ;
- foreach (0 .. @$a - 1)
+ foreach (0 .. @$a-1)
{
return 0 unless $$a[$_] eq $$b[$_];
}
View
2  cpan/List-Util/ListUtil.xs
@@ -595,7 +595,7 @@ BOOT:
varav = GvAVn(vargv);
#endif
if (SvTYPE(rmcgv) != SVt_PVGV)
- gv_init(rmcgv, lu_stash, "List::Util", 12, TRUE);
+ gv_init(rmcgv, lu_stash, "List::Util", 10, TRUE);
rmcsv = GvSVn(rmcgv);
#ifndef SvWEAKREF
av_push(varav, newSVpv("weaken",6));
View
8 cpan/Version-Requirements/Changes
@@ -1,5 +1,13 @@
Revision history for Version-Requirements
+0.101022 2012-02-03 10:29:59 America/New_York
+ DEPRECATED DEPRECATED DEPRECATED DEPRECATED
+
+ Version::Requirements is still DEPRECATED
+
+ deprecation is only warned-about if not doing core perl tests,
+ to quiet them up for the sake of porters' sanity
+
0.101021 2011-12-30 15:39:56 America/New_York
DEPRECATED DEPRECATED DEPRECATED DEPRECATED
View
9 cpan/Version-Requirements/lib/Version/Requirements.pm
@@ -2,7 +2,7 @@ use strict;
use warnings;
package Version::Requirements;
{
- $Version::Requirements::VERSION = '0.101021';
+ $Version::Requirements::VERSION = '0.101022';
}
# ABSTRACT: a set of version requirements for a CPAN dist
@@ -11,9 +11,12 @@ use Carp ();
use Scalar::Util ();
use version 0.77 (); # the ->parse method
+# We silence this warning during core tests, because this is only in core
+# because it has to be, and nobody wants to see this stupid warning.
+# -- rjbs, 2012-01-20
Carp::cluck(
"Version::Requirements is deprecated; replace with CPAN::Meta::Requirements"
-);
+) unless $ENV{PERL_CORE};
sub new {
@@ -390,7 +393,7 @@ Version::Requirements - a set of version requirements for a CPAN dist
=head1 VERSION
-version 0.101021
+version 0.101022
=head1 SYNOPSIS
View
2  cpan/autodie/t/backcompat.t
@@ -8,7 +8,7 @@ eval {
open(my $fh, '<', NO_SUCH_FILE);
};
-my $old_msg = qr{Can't open\(GLOB\(0x[0-9a-f]+\), <, xyzzy_this_file_is_not_here\): .* at \(eval \d+\)(?:\[.*?\])? line \d+\s+main::__ANON__\('GLOB\(0x[0-9a-f]+\)',\s*'<',\s*'xyzzy_this_file_is_not_here'\) called at \S+ line \d+\s+eval \Q{...}\E called at \S+ line \d+};
+my $old_msg = qr{Can't open\(GLOB\(0x[0-9a-f]+\), <, xyzzy_this_file_is_not_here\): .* at \(eval \d+\)(?:\[.*?\])? line \d+\.\s+main::__ANON__\('GLOB\(0x[0-9a-f]+\)',\s*'<',\s*'xyzzy_this_file_is_not_here'\) called at \S+ line \d+\s+eval \Q{...}\E called at \S+ line \d+};
like($@,$old_msg,"Backwards compat ugly messages");
is(ref($@),"", "Exception is a string, not an object");
View
29 dist/Carp/lib/Carp.pm
@@ -6,8 +6,8 @@ use warnings;
BEGIN {
no strict "refs";
- if(exists($::{"utf8::"}) && exists($utf8::{"is_utf8"}) &&
- defined(*{"utf8::is_utf8"}{CODE})) {
+ if(exists($::{"utf8::"}) && exists(*{$::{"utf8::"}}{HASH}->{"is_utf8"}) &&
+ defined(*{*{$::{"utf8::"}}{HASH}->{"is_utf8"}}{CODE})) {
*is_utf8 = \&{"utf8::is_utf8"};
} else {
*is_utf8 = sub { 0 };
@@ -16,15 +16,15 @@ BEGIN {
BEGIN {
no strict "refs";
- if(exists($::{"utf8::"}) && exists($utf8::{"downgrade"}) &&
- defined(*{"utf8::downgrade"}{CODE})) {
+ if(exists($::{"utf8::"}) && exists(*{$::{"utf8::"}}{HASH}->{"downgrade"}) &&
+ defined(*{*{$::{"utf8::"}}{HASH}->{"downgrade"}}{CODE})) {
*downgrade = \&{"utf8::downgrade"};
} else {
*downgrade = sub {};
}
}
-our $VERSION = '1.24';
+our $VERSION = '1.25';
our $MaxEvalLen = 0;
our $Verbose = 0;
@@ -297,7 +297,7 @@ sub ret_backtrace {
$mess .= $1;
}
}
- $mess .= "\n";
+ $mess .= "\.\n";
while ( my %i = caller_info( ++$i ) ) {
$mess .= "\t$i{sub_name} called at $i{file} line $i{line}$tid_msg\n";
@@ -318,7 +318,7 @@ sub ret_summary {
}
my %i = caller_info($i);
- return "$err at $i{file} line $i{line}$tid_msg\n";
+ return "$err at $i{file} line $i{line}$tid_msg\.\n";
}
sub short_error_loc {
@@ -402,6 +402,17 @@ sub trusts_directly {
: @{"$class\::ISA"};
}
+if(!defined($warnings::VERSION) || $warnings::VERSION < 1.03) {
+ # Very old versions of warnings.pm import from Carp. This can go
+ # wrong due to the circular dependency. If Carp is invoked before
+ # warnings, then Carp starts by loading warnings, then warnings
+ # tries to import from Carp, and gets nothing because Carp is in
+ # the process of loading and hasn't defined its import method yet.
+ # So we work around that by manually exporting to warnings here.
+ no strict "refs";
+ *{"warnings::$_"} = \&$_ foreach @EXPORT;
+}
+
1;
__END__
@@ -647,9 +658,9 @@ distribution.
=head1 COPYRIGHT
-Copyright (C) 1994-2011 Larry Wall
+Copyright (C) 1994-2012 Larry Wall
-Copyright (C) 2011 Andrew Main (Zefram) <zefram@fysh.org>
+Copyright (C) 2011, 2012 Andrew Main (Zefram) <zefram@fysh.org>
=head1 LICENSE
View
2  dist/Carp/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.23';
+our $VERSION = '1.25';
1;
View
26 dist/Carp/t/Carp.t
@@ -29,7 +29,7 @@ BEGIN {
{
local $SIG{__WARN__} = sub {
- like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+$/, 'ok 2\n';
+ like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+\.$/, 'ok 2\n';
};
carp "ok 2\n";
@@ -37,7 +37,7 @@ BEGIN {
{
local $SIG{__WARN__} = sub {
- like $_[0], qr/(\d+) at.+\b(?i:carp\.t) line \d+$/, 'carp 3';
+ like $_[0], qr/(\d+) at.+\b(?i:carp\.t) line \d+\.$/, 'carp 3';
};
carp 3;
@@ -46,7 +46,7 @@ BEGIN {
sub sub_4 {
local $SIG{__WARN__} = sub {
like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\tmain::sub_4\(\) called at.+\b(?i:carp\.t) line \d+$/,
+ qr/^(\d+) at.+\b(?i:carp\.t) line \d+\.\n\tmain::sub_4\(\) called at.+\b(?i:carp\.t) line \d+$/,
'cluck 4';
};
@@ -58,7 +58,7 @@ sub_4;
{
local $SIG{__DIE__} = sub {
like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+$/,
+ qr/^(\d+) at.+\b(?i:carp\.t) line \d+\.\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+$/,
'croak 5';
};
@@ -68,7 +68,7 @@ sub_4;
sub sub_6 {
local $SIG{__DIE__} = sub {
like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+\n\tmain::sub_6\(\) called at.+\b(?i:carp\.t) line \d+$/,
+ qr/^(\d+) at.+\b(?i:carp\.t) line \d+\.\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+\n\tmain::sub_6\(\) called at.+\b(?i:carp\.t) line \d+$/,
'confess 6';
};
@@ -193,8 +193,8 @@ sub w { cluck @_ }
# $Carp::Verbose;
{
my $aref = [
- qr/t at \S*(?i:carp.t) line \d+/,
- qr/t at \S*(?i:carp.t) line \d+\n\s*main::x\('t'\) called at \S*(?i:carp.t) line \d+/
+ qr/t at \S*(?i:carp.t) line \d+\./,
+ qr/t at \S*(?i:carp.t) line \d+\.\n\s*main::x\('t'\) called at \S*(?i:carp.t) line \d+/
];
my $i = 0;
@@ -247,8 +247,8 @@ sub w { cluck @_ }
{
my $i = 0;
my $aref = [
- qr/1234 at \S*(?i:carp.t) line \d+\n\s*main::w\(1, 2, 3, 4\) called at \S*(?i:carp.t) line \d+/,
- qr/1234 at \S*(?i:carp.t) line \d+\n\s*main::w\(1, 2, \.\.\.\) called at \S*(?i:carp.t) line \d+/,
+ qr/1234 at \S*(?i:carp.t) line \d+\.\n\s*main::w\(1, 2, 3, 4\) called at \S*(?i:carp.t) line \d+/,
+ qr/1234 at \S*(?i:carp.t) line \d+\.\n\s*main::w\(1, 2, \.\.\.\) called at \S*(?i:carp.t) line \d+/,
];
for (@$aref) {
@@ -266,8 +266,8 @@ sub w { cluck @_ }
{
my $i = 0;
my $aref = [
- qr/1 at \S*(?i:carp.t) line \d+\n\s*main::w\(1\) called at \S*(?i:carp.t) line \d+/,
- qr/1 at \S*(?i:carp.t) line \d+$/,
+ qr/1 at \S*(?i:carp.t) line \d+\.\n\s*main::w\(1\) called at \S*(?i:carp.t) line \d+/,
+ qr/1 at \S*(?i:carp.t) line \d+\.$/,
];
for (@$aref) {
@@ -305,7 +305,7 @@ sub cluck_undef {
local $SIG{__WARN__} = sub {
like $_[0],
- qr/^Bang! at.+\b(?i:carp\.t) line \d+\n\tmain::cluck_undef\(0, 'undef', 2, undef, 4\) called at.+\b(?i:carp\.t) line \d+$/,
+ qr/^Bang! at.+\b(?i:carp\.t) line \d+\.\n\tmain::cluck_undef\(0, 'undef', 2, undef, 4\) called at.+\b(?i:carp\.t) line \d+$/,
"cluck doesn't quote undef";
};
@@ -427,7 +427,7 @@ SKIP:
<D::DATA> for 1..2;
eval { croak 'heek' };
$@ =~ s/\n.*//; # just check first line
-is $@, "heek at ".__FILE__." line ".(__LINE__-2).", <DATA> line 2\n",
+is $@, "heek at ".__FILE__." line ".(__LINE__-2).", <DATA> line 2.\n",
'last handle line num is mentioned';
View
6 dist/Carp/t/heavy.t
@@ -1,7 +1,11 @@
-print "1..2\n";
+print "1..3\n";
print defined(&Carp::carp) ? "not " : "", "ok 1 # control\n";
require Carp::Heavy;
print defined(&Carp::carp) ? "" : "not ", "ok 2 # carp loaded by Carp::Heavy\n";
+eval q{
+ print $Carp::Heavy::VERSION eq $Carp::VERSION ? "" : "not ",
+ "ok 3 # version numbers match\n";
+};
1;
View
5 dist/Carp/t/swash.t
@@ -0,0 +1,5 @@
+BEGIN { print "1..1\n"; }
+use Carp;
+my $x = "foo\x{666}"; $x =~ /foo\p{Alnum}/;
+print "ok 1\n";
+1;
View
17 dist/Carp/t/vivify_gv.t
@@ -1,16 +1,11 @@
-use warnings;
-use strict;
+BEGIN { print "1..2\n"; }
-our $has_is_utf8;
-BEGIN { $has_is_utf8 = exists($utf8::{"is_utf8"}); }
+our $has_is_utf8; BEGIN { $has_is_utf8 = exists($utf8::{"is_utf8"}); }
+our $has_dgrade; BEGIN { $has_dgrade = exists($utf8::{"downgrade"}); }
-our $has_downgrade;
-BEGIN { $has_downgrade = exists($utf8::{"downgrade"}); }
+use Carp;
-use Test::More tests => 3;
-
-BEGIN { use_ok "Carp"; }
-ok(!(exists($utf8::{"is_utf8"}) xor $has_is_utf8));
-ok(!(exists($utf8::{"downgrade"}) xor $has_downgrade));
+print !(exists($utf8::{"is_utf8"}) xor $has_is_utf8) ? "" : "not ", "ok 1\n";
+print !(exists($utf8::{"downgrade"}) xor $has_dgrade) ? "" : "not ", "ok 2\n";
1;
View
9 dist/Carp/t/vivify_stash.t
@@ -0,0 +1,9 @@
+BEGIN { print "1..1\n"; }
+
+our $has_utf8; BEGIN { $has_utf8 = exists($::{"utf8::"}); }
+
+use Carp;
+
+print !(exists($::{"utf8::"}) xor $has_utf8) ? "" : "not ", "ok 1\n";
+
+1;
View
9 dist/Carp/t/with_warnings.t
@@ -0,0 +1,9 @@
+BEGIN { print "1..1\n"; }
+
+use Carp ();
+use warnings ();
+$SIG{__WARN__} = sub {};
+eval { warnings::warn("syntax", "foo") };
+print $@ eq "" ? "" : "not ", "ok 1\n";
+
+1;
View
3  dist/Cwd/Cwd.pm
@@ -171,7 +171,7 @@ use strict;
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-$VERSION = '3.39_01';
+$VERSION = '3.39_02';
my $xs_version = $VERSION;
$VERSION =~ tr/_//;
@@ -579,6 +579,7 @@ sub _perl_abs_path
unless (opendir(PARENT, $dotdots))
{
# probably a permissions issue. Try the native command.
+ require File::Spec;
return File::Spec->rel2abs( $start, _backtick_pwd() );
}
unless (@cst = stat($dotdots))
View
9 dist/Data-Dumper/Dumper.pm
@@ -10,7 +10,7 @@
package Data::Dumper;
BEGIN {
- $VERSION = '2.135_03'; # Don't forget to set version and release
+ $VERSION = '2.135_04'; # Don't forget to set version and release
} # date in POD!
#$| = 1;
@@ -373,7 +373,7 @@ sub _dump {
} else {
$pat = "$val";
}
- $pat =~ s,/,\\/,g;
+ $pat =~ s <(\\.)|/> { $1 || '\\/' }ge;
$out .= "qr/$pat/";
}
elsif ($realtype eq 'SCALAR' || $realtype eq 'REF'
@@ -498,7 +498,8 @@ sub _dump {
$s->{seen}{$id} = ["\\$name", $ref];
}
}
- if (ref($ref) eq 'GLOB' or "$ref" =~ /=GLOB\([^()]+\)$/) { # glob
+ $ref = \$val;
+ if (ref($ref) eq 'GLOB') { # glob
my $name = substr($val, 1);
if ($name =~ /^[A-Za-z_][\w:]*$/ && $name ne 'main::') {
$name =~ s/^main::/::/;
@@ -538,7 +539,7 @@ sub _dump {
$out .= $v;
}
elsif (!defined &_vstring
- and ref \$val eq 'VSTRING' || eval{Scalar::Util::isvstring($val)}) {
+ and ref $ref eq 'VSTRING' || eval{Scalar::Util::isvstring($val)}) {
$out .= sprintf "%vd", $val;
}
elsif ($val =~ /^(?:0|-?[1-9]\d{0,8})\z/) { # safe decimal number
View
11 dist/Data-Dumper/Dumper.xs
@@ -463,14 +463,17 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
{
STRLEN rlen;
const char *rval = SvPV(val, rlen);
- const char *slash = strchr(rval, '/');
+ const char * const rend = rval+rlen;
+ const char *slash = rval;
sv_catpvn(retval, "qr/", 3);
- while (slash) {
+ for (;slash < rend; slash++) {
+ if (*slash == '\\') { ++slash; continue; }
+ if (*slash == '/') {
sv_catpvn(retval, rval, slash-rval);
sv_catpvn(retval, "\\/", 2);
rlen -= slash-rval+1;
rval = slash+1;
- slash = strchr(rval, '/');
+ }
}
sv_catpvn(retval, rval, rlen);
sv_catpvn(retval, "/", 1);
@@ -648,7 +651,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
(void)hv_iterinit((HV*)ival);
while ((entry = hv_iternext((HV*)ival))) {
sv = hv_iterkeysv(entry);
- SvREFCNT_inc(sv);
+ (void)SvREFCNT_inc(sv);
av_push(keys, sv);
}
# ifdef USE_LOCALE_NUMERIC
View
20 dist/Data-Dumper/t/dumper.t
@@ -83,11 +83,11 @@ sub SKIP_TEST {
$Data::Dumper::Useperl = 1;
if (defined &Data::Dumper::Dumpxs) {
print "### XS extension loaded, will run XS tests\n";
- $TMAX = 384; $XS = 1;
+ $TMAX = 390; $XS = 1;
}
else {
print "### XS extensions not loaded, will NOT run XS tests\n";
- $TMAX = 192; $XS = 0;
+ $TMAX = 195; $XS = 0;
}
print "1..$TMAX\n";
@@ -1503,3 +1503,19 @@ EOU
TEST q(Data::Dumper->Dumpxs(\@::_v, [qw(a b c d)])), 'xs vstrings'
if $XS;
}
+
+############# 384
+{
+ # [perl #107372] blessed overloaded globs
+ $WANT = <<'EOW';
+#$VAR1 = bless( \*::finkle, 'overtest' );
+EOW
+ {
+ package overtest;
+ use overload fallback=>1, q\""\=>sub{"oaoaa"};
+ }
+ TEST q(Data::Dumper->Dump([bless \*finkle, "overtest"])),
+ 'blessed overloaded globs';
+ TEST q(Data::Dumper->Dumpxs([\*finkle])), 'blessed overloaded globs (xs)'
+ if $XS;
+}
View
24 dist/Data-Dumper/t/qr.t
@@ -0,0 +1,24 @@
+#!perl -X
+
+BEGIN {
+ require Config; import Config;
+ no warnings 'once';
+ if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
+ print "1..0 # Skip: Data::Dumper was not built\n";
+ exit 0;
+ }
+}
+
+use Test::More tests => 2;
+use Data::Dumper;
+
+{
+ my $q = q| \/ |;
+ use Data::Dumper;
+ my $qr = qr{$q};
+ eval Dumper $qr;
+ ok(!$@, "Dumping $qr with XS") or diag $@, Dumper $qr;
+ local $Data::Dumper::Useperl = 1;
+ eval Dumper $qr;
+ ok(!$@, "Dumping $qr with PP") or diag $@, Dumper $qr;
+}
View
34 ext/B/t/pollute.t
@@ -0,0 +1,34 @@
+#!./perl -w
+# RT#81332 May not pollute the namespace for the compiler with all the XS constants
+BEGIN {
+ unshift @INC, 't';
+ require Config;
+ if (($Config::Config{'extensions'} !~ /\bB\b/) ){
+ print "1..0 # Skip -- Perl configured without B module\n";
+ exit 0;
+ }
+ require 'test.pl';
+}
+
+CHECK {
+ plan(3);
+ ok(SVp_IOK, "SVp_IOK imported as requested");
+
+ my $found;
+ while ( my ( $k, $v ) = each %B:: ) {
+ $found++ if $k eq 'SVf_IOK';
+ }
+ ok(!$found, "RT#81332 B constants may not be initialized at BEGIN" );
+}
+
+use B qw(SVp_IOK);
+
+{
+ my $found;
+ while ( my ( $k, $v ) = each %B:: ) {
+ $found++ if $k eq 'SVf_IOK';
+ }
+ ok($found, "B constants initialized at run-time" );
+}
+
+1;
View
2  ext/Hash-Util/t/Util.t
@@ -155,7 +155,7 @@ is( $hash{locked}, 42, 'unlock_value' );
my %hash = (foo => 42, bar => undef);
eval { lock_keys(%hash, qw(foo baz)); };
is( $@, sprintf("Hash has key 'bar' which is not in the new key ".
- "set at %s line %d\n", __FILE__, __LINE__ - 2),
+ "set at %s line %d.\n", __FILE__, __LINE__ - 2),
'carp test' );
}
View
29 ext/PerlIO-scalar/t/scalar.t
@@ -320,18 +320,23 @@ EOF
# [perl #108398]
sub has_trailing_nul(\$) {
- my ($ref) = @_;
- my $sv = B::svref_2object($ref);
- return undef if !$sv->isa('B::PV');
-
- my $cur = $sv->CUR;
- my $len = $sv->LEN;
- return 0 if $cur >= $len;
-
- my $ptrfmt = $Config::Config{ptrsize} == $Config::Config{intsize} ? "I" : "J";
- my $pv_addr = unpack $ptrfmt, pack 'P', $$ref;
- my $trailing = unpack 'P', pack $ptrfmt, $pv_addr+$cur;
- return $trailing eq "\0";
+ my ($ref) = @_;
+ my $sv = B::svref_2object($ref);
+ return undef if !$sv->isa('B::PV');
+
+ my $cur = $sv->CUR;
+ my $len = $sv->LEN;
+ return 0 if $cur >= $len;
+
+ my $ptrlen = length(pack('P', ''));
+ my $ptrfmt
+ = $ptrlen == length(pack('J', 0)) ? 'J'
+ : $ptrlen == length(pack('I', 0)) ? 'I'
+ : die "Can't determine pointer format";
+
+ my $pv_addr = unpack $ptrfmt, pack 'P', $$ref;
+ my $trailing = unpack 'P', pack $ptrfmt, $pv_addr+$cur;
+ return $trailing eq "\0";
}
SKIP: {
if ($Config::Config{'extensions'} !~ m!\bPerlIO/scalar\b!) {
View
181 ext/Pod-Html/lib/Pod/Html.pm
@@ -3,7 +3,7 @@ use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = 1.13;
+$VERSION = 1.14;
@ISA = qw(Exporter);
@EXPORT = qw(pod2html htmlify);
@EXPORT_OK = qw(anchorify);
@@ -31,7 +31,8 @@ Pod::Html - module to convert pod files to HTML
=head1 DESCRIPTION
Converts files from pod format (see L<perlpod>) to HTML format. It
-can automatically generate indexes and cross-references.
+can automatically generate indexes and cross-references, and it keeps
+a cache of things it knows how to cross-reference.
=head1 FUNCTIONS
@@ -56,6 +57,12 @@ pod2html takes the following arguments:
Turns every C<head1> heading into a link back to the top of the page.
By default, no backlinks are generated.
+=item cachedir
+
+ --cachedir=name
+
+Creates the directory cache in the given directory.
+
=item css
--css=stylesheet
@@ -63,6 +70,12 @@ By default, no backlinks are generated.
Specify the URL of a cascading style sheet. Also disables all HTML/CSS
C<style> attributes that are output by default (to avoid conflicts).
+=item flush
+
+ --flush
+
+Flushes the directory cache.
+
=item header
--header
@@ -203,6 +216,8 @@ This program is distributed under the Artistic License.
=cut
+my $Cachedir;
+my $Dircache;
my($Htmlroot, $Htmldir, $Htmlfile, $Htmlfileurl);
my($Podfile, @Podpath, $Podroot);
my $Poderrors;
@@ -225,6 +240,11 @@ my $Curdir = File::Spec->curdir;
init_globals();
sub init_globals {
+ $Cachedir = "."; # The directory to which directory caches
+ # will be written.
+
+ $Dircache = "pod2htmd.tmp";
+
$Htmlroot = "/"; # http-server base directory from which all
# relative paths in $podpath stem.
$Htmldir = ""; # The directory to which the html pages
@@ -272,20 +292,37 @@ sub pod2html {
# be used throughout.
#$Htmlfileurl = "$Htmldir/" . substr( $Htmlfile, length( $Htmldir ) + 1);
# Is the above not just "$Htmlfileurl = $Htmlfile"?
- $Htmlfileurl = Unixify::unixify($Htmlfile);
+ $Htmlfileurl = Pod::Html::_unixify($Htmlfile);
}
-
- my $pwd = getcwd();
- chdir($Podroot) || die "$0: error changing to directory $Podroot: $!\n";
- # find all pod modules/pages in podpath, store in %Pages
- # - callback used to remove Podroot and extension from each file
- # - laborious to allow '.' in dirnames (e.g., /usr/share/perl/5.14.1)
- Pod::Simple::Search->new->inc(0)->verbose($Verbose)->laborious(1)
- ->callback(\&_save_page)->recurse($Recurse)->survey(@Podpath);
+ # load or generate/cache %Pages
+ unless (get_cache($Dircache, \@Podpath, $Podroot, $Recurse)) {
+ # generate %Pages
+ my $pwd = getcwd();
+ chdir($Podroot) ||
+ die "$0: error changing to directory $Podroot: $!\n";
+
+ # find all pod modules/pages in podpath, store in %Pages
+ # - callback used to remove Podroot and extension from each file
+ # - laborious to allow '.' in dirnames (e.g., /usr/share/perl/5.14.1)
+ Pod::Simple::Search->new->inc(0)->verbose($Verbose)->laborious(1)
+ ->callback(\&_save_page)->recurse($Recurse)->survey(@Podpath);
+
+ chdir($pwd) || die "$0: error changing to directory $pwd: $!\n";
+
+ # cache the directory list for later use
+ warn "caching directories for later use\n" if $Verbose;
+ open my $cache, '>', $Dircache
+ or die "$0: error open $Dircache for writing: $!\n";
+
+ print $cache join(":", @Podpath) . "\n$Podroot\n";
+ foreach my $key (keys %Pages) {
+ print $cache "$key $Pages{$key}\n";
+ }
- chdir($pwd) || die "$0: error changing to directory $pwd: $!\n";
+ close $cache or die "error closing $Dircache: $!";
+ }
# set options for the parser
my $parser = Pod::Simple::XHTML::LocalPodLinks->new();
@@ -388,12 +425,14 @@ sub usage {
warn "$0: $podfile: @_\n" if @_;
die <<END_OF_USAGE;
Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name>
- --podpath=<name>:...:<name> --podroot=<name>
+ --podpath=<name>:...:<name> --podroot=<name> --cachedir=<name>
--recurse --verbose --index --norecurse --noindex
--[no]backlink - turn =head1 directives into links pointing to the top of
the page (off by default).
+ --cachedir - directory for the directory cache files.
--css - stylesheet URL
+ --flush - flushes the directory cache.
--[no]header - produce block header/footer (default is no headers).
--help - prints this message.
--htmldir - directory for resulting HTML files.
@@ -422,15 +461,17 @@ END_OF_USAGE
}
sub parse_command_line {
- my ($opt_backlink,$opt_css,$opt_header,$opt_help,
- $opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,
+ my ($opt_backlink,$opt_cachedir,$opt_css,$opt_flush,$opt_header,
+ $opt_help,$opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,
$opt_outfile,$opt_poderrors,$opt_podpath,$opt_podroot,
$opt_quiet,$opt_recurse,$opt_title,$opt_verbose);
unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html};
my $result = GetOptions(
'backlink!' => \$opt_backlink,
+ 'cachedir=s' => \$opt_cachedir,
'css=s' => \$opt_css,
+ 'flush' => \$opt_flush,
'help' => \$opt_help,
'header!' => \$opt_header,
'htmldir=s' => \$opt_htmldir,
@@ -454,6 +495,7 @@ sub parse_command_line {
@Podpath = split(":", $opt_podpath) if defined $opt_podpath;
$Backlink = $opt_backlink if defined $opt_backlink;
+ $Cachedir = $opt_cachedir if defined $opt_cachedir;
$Css = $opt_css if defined $opt_css;
$Header = $opt_header if defined $opt_header;
$Htmldir = $opt_htmldir if defined $opt_htmldir;
@@ -467,9 +509,87 @@ sub parse_command_line {
$Recurse = $opt_recurse if defined $opt_recurse;
$Title = $opt_title if defined $opt_title;
$Verbose = $opt_verbose if defined $opt_verbose;
+
+ warn "Flushing directory caches\n"
+ if $opt_verbose && defined $opt_flush;
+ $Dircache = "$Cachedir/pod2htmd.tmp";
+ if (defined $opt_flush) {
+ 1 while unlink($Dircache);
+ }
+}
+
+my $Saved_Cache_Key;
+
+sub get_cache {
+ my($dircache, $podpath, $podroot, $recurse) = @_;
+ my @cache_key_args = @_;
+
+ # A first-level cache:
+ # Don't bother reading the cache files if they still apply
+ # and haven't changed since we last read them.
+
+ my $this_cache_key = cache_key(@cache_key_args);
+ return 1 if $Saved_Cache_Key and $this_cache_key eq $Saved_Cache_Key;
+ $Saved_Cache_Key = $this_cache_key;
+
+ # load the cache of %Pages if possible. $tests will be
+ # non-zero if successful.
+ my $tests = 0;
+ if (-f $dircache) {
+ warn "scanning for directory cache\n" if $Verbose;
+ $tests = load_cache($dircache, $podpath, $podroot);
+ }
+
+ return $tests;
+}
+
+sub cache_key {
+ my($dircache, $podpath, $podroot, $recurse) = @_;
+ return join('!',$dircache,$recurse,@$podpath,$podroot,stat($dircache));
}
#
+# load_cache - tries to find if the cache stored in $dircache is a valid
+# cache of %Pages. if so, it loads them and returns a non-zero value.
+#
+sub load_cache {
+ my($dircache, $podpath, $podroot) = @_;
+ my $tests = 0;
+ local $_;
+
+ warn "scanning for directory cache\n" if $Verbose;
+ open(my $cachefh, '<', $dircache) ||
+ die "$0: error opening $dircache for reading: $!\n";
+ $/ = "\n";
+
+ # is it the same podpath?
+ $_ = <$cachefh>;
+ chomp($_);
+ $tests++ if (join(":", @$podpath) eq $_);
+
+ # is it the same podroot?
+ $_ = <$cachefh>;
+ chomp($_);
+ $tests++ if ($podroot eq $_);
+
+ # load the cache if its good
+ if ($tests != 2) {
+ close($cachefh);
+ return 0;
+ }
+
+ warn "loading directory cache\n" if $Verbose;
+ while (<$cachefh>) {
+ /(.*?) (.*)$/;
+ $Pages{$1} = $2;
+ }
+
+ close($cachefh);
+ return 1;
+}
+
+
+#
# html_escape: make text safe for HTML
#
sub html_escape {
@@ -527,13 +647,19 @@ sub _save_page {
}
# Convert path to unix style path
- $modspec = Unixify::unixify($modspec);
+ $modspec = Pod::Html::_unixify($modspec);
my ($file, $dir) = fileparse($modspec, qr/\.[^.]*/); # strip .ext
$Pages{$modname} = $dir.$file;
}
-1;
+sub _unixify {
+ my $full_path = shift;
+ return '' unless $full_path;
+
+ return File::Spec::Unix->catfile( # change \s to /s and such
+ File::Spec->splitdir($full_path));
+}
package Pod::Simple::XHTML::LocalPodLinks;
use strict;
@@ -598,14 +724,14 @@ sub resolve_pod_page_link {
# The use of catdir here (instead of catfile) ensures there will be one
# '/' between htmlroot and $path; not zero (if htmlroot == ''), not two
# (if htmlroot =~ m#/\z# and $path =~ m#\a/#), just one.
- my $url = File::Spec::Unix->catdir( Unixify::unixify($self->htmlroot),
+ my $url = File::Spec::Unix->catdir( Pod::Html::_unixify($self->htmlroot),
$path);
if ($self->htmlfileurl ne '') {
# then $self->htmlroot eq '' (by definition of htmlfileurl) so
# $self->htmldir needs to be prepended to link to get the absolute path
# that will be relativized
$url = relativize_url(
- File::Spec::Unix->catdir( Unixify::unixify($self->htmldir), $url),
+ File::Spec::Unix->catdir( Pod::Html::_unixify($self->htmldir), $url),
$self->htmlfileurl # already unixified
);
}
@@ -644,20 +770,3 @@ sub relativize_url {
}
1;
-
-package Unixify;
-use warnings;
-use strict;
-
-use File::Spec;
-use File::Spec::Unix;
-
-sub unixify {
- my $full_path = shift;
- return '' unless $full_path;
-
- return File::Spec::Unix->catfile( # change \s to /s and such
- File::Spec->splitdir($full_path));
-}
-
-1;
View
3  ext/Pod-Html/t/cache.pod
@@ -0,0 +1,3 @@
+=head1 NAME
+
+the contents of this file doesn't matter
View
71 ext/Pod-Html/t/cache.t
@@ -0,0 +1,71 @@
+#!/usr/bin/perl -w # -*- perl -*-
+
+BEGIN {
+ die "Run me from outside the t/ directory, please" unless -d 't';
+}
+
+# test the directory cache
+# XXX test --flush and %Pages being loaded/used for cross references
+
+use strict;
+use Cwd;
+use Pod::Html;
+use Data::Dumper;
+use Test::More tests => 10;
+
+my $cwd = Cwd::cwd();
+my $infile = "t/cache.pod";
+my $outfile = "cacheout.html";
+my $cachefile = "pod2htmd.tmp";
+my $tcachefile = "t/pod2htmd.tmp";
+
+unlink $cachefile, $tcachefile;
+is(-f $cachefile, undef, "No cache file to start");
+is(-f $tcachefile, undef, "No cache file to start");
+
+# test podpath and podroot
+Pod::Html::pod2html(
+ "--infile=$infile",
+ "--outfile=$outfile",
+ "--podpath=scooby:shaggy:fred:velma:daphne",
+ "--podroot=$cwd",
+ );
+is(-f $cachefile, 1, "Cache created");
+open(my $cache, '<', $cachefile) or die "Cannot open cache file: $!";
+chomp(my $podpath = <$cache>);
+chomp(my $podroot = <$cache>);
+close $cache;
+is($podpath, "scooby:shaggy:fred:velma:daphne", "podpath");
+is($podroot, "$cwd", "podroot");
+
+# test cache contents
+Pod::Html::pod2html(
+ "--infile=$infile",
+ "--outfile=$outfile",
+ "--cachedir=t",
+ "--podpath=t",
+ "--htmldir=$cwd",
+ );
+is(-f $tcachefile, 1, "Cache created");
+open($cache, '<', $tcachefile) or die "Cannot open cache file: $!";
+chomp($podpath = <$cache>);
+chomp($podroot = <$cache>);
+is($podpath, "t", "podpath");
+my %pages;
+while (<$cache>) {
+ /(.*?) (.*)$/;
+ $pages{$1} = $2;
+}
+chdir("t");
+my %expected_pages =
+ # chop off the .pod and set the path
+ map { my $f = substr($_, 0, -4); $f => "$cwd/t/$f" }
+ <*.pod>;
+chdir($cwd);
+is_deeply(\%pages, \%expected_pages, "cache contents");
+close $cache;
+
+unlink $outfile;
+unlink $cachefile, $tcachefile;
+is(-f $cachefile, undef, "No cache file to end");
+is(-f $tcachefile, undef, "No cache file to end");
View
1  ext/Pod-Html/t/pod2html-lib.pl
@@ -84,6 +84,7 @@ sub convert_n_test {
# pod2html creates these
1 while unlink $outfile;
+ 1 while unlink "pod2htmd.tmp";
}
1;
View
53 ext/XS-Typemap/Typemap.xs
@@ -30,10 +30,8 @@ typedef int intTLONG; /* T_LONG */
typedef short shortOPQ; /* T_OPAQUE */
typedef int intOpq; /* T_OPAQUEPTR */
typedef unsigned intUnsigned; /* T_U_INT */
-
-/* Craig reports problems with the PerlIO related tests (VMS?) */
-/* typedef PerlIO inputfh; */ /* T_IN */
-/* typedef PerlIO outputfh; */ /* T_OUT */
+typedef PerlIO * inputfh; /* T_IN */
+typedef PerlIO * outputfh; /* T_OUT */
/* A structure to test T_OPAQUEPTR and T_PACKED */
struct t_opaqueptr {
@@ -245,10 +243,8 @@ AV_FIXED * T_AVREF_REFCOUNT_FIXED
HV_FIXED * T_HVREF_REFCOUNT_FIXED
CV_FIXED * T_CVREF_REFCOUNT_FIXED
SVREF_FIXED T_SVREF_REFCOUNT_FIXED
-
-# Craig reports problems with PerlIO related typemap tests (VMS?)
-#inputfh T_IN
-#outputfh T_OUT
+inputfh T_IN
+outputfh T_OUT
END_OF_TYPEMAP
@@ -915,35 +911,30 @@ T_STDIO_print( stream, string )
## T_INOUT
-## Craig reports issues with PerlIO related typemap tests (VMS?)
-
-## PerlIO *
-## T_INOUT(in)
-## PerlIO *in;
-## CODE:
-## RETVAL = in; /* silly test but better than nothing */
-## OUTPUT: RETVAL
+PerlIO *
+T_INOUT(in)
+ PerlIO *in;
+ CODE:
+ RETVAL = in; /* silly test but better than nothing */
+ OUTPUT: RETVAL
## T_IN
-## Craig reports issues with PerlIO related typemap tests (VMS?)
-
-## inputfh
-## T_IN(in)
-## inputfh in;
-## CODE:
-## RETVAL = in; /* silly test but better than nothing */
-## OUTPUT: RETVAL
+inputfh
+T_IN(in)
+ inputfh in;
+ CODE:
+ RETVAL = in; /* silly test but better than nothing */
+ OUTPUT: RETVAL
## T_OUT
-## Craig reports issues with PerlIO related typemap tests (VMS?)
-## outputfh
-## T_OUT(in)
-## outputfh in;
-## CODE:
-## RETVAL = in; /* silly test but better than nothing */
-## OUTPUT: RETVAL
+outputfh
+T_OUT(in)
+ outputfh in;
+ CODE:
+ RETVAL = in; /* silly test but better than nothing */
+ OUTPUT: RETVAL
View
110 ext/XS-Typemap/t/Typemap.t
@@ -6,7 +6,7 @@ BEGIN {
}
}
-use Test::More tests => 108;
+use Test::More tests => 140;
use strict;
use warnings;
@@ -283,9 +283,14 @@ for (0..$#opq) {
note("T_PACKED");
my $struct = T_PACKED_out(-4, 3, 2.1);
ok(ref($struct) eq 'HASH');
-is_deeply($struct, {a => -4, b => 3, c => 2.1});
+is_approx($struct->{a}, -4);
+is_approx($struct->{b}, 3);
+is_approx($struct->{c}, 2.1);
my @rv = T_PACKED_in($struct);
-is_deeply(\@rv, [-4, 3, 2.1]);
+is(scalar(@rv), 3);
+is_approx($rv[0], -4);
+is_approx($rv[1], 3);
+is_approx($rv[2], 2.1);
# T_PACKEDARRAY
SCOPE: {
@@ -299,12 +304,19 @@ SCOPE: {
push @out, {a => $d[$_*3], b => $d[$_*3+1], c => $d[$_*3+2]} for (0..2);
my $structs = T_PACKEDARRAY_out(@d);
ok(ref($structs) eq 'ARRAY');
- is_deeply(
- $structs,
- \@out
- );
+ is(scalar(@$structs), 3);
+ foreach my $i (0..2) {
+ my $s = $structs->[$i];
+ is(