Skip to content

Commit

Permalink
Import of TODDR/YAML-Syck-1.21_01 from CPAN.
Browse files Browse the repository at this point in the history
gitpan-cpan-distribution: YAML-Syck
gitpan-cpan-version:      1.21_01
gitpan-cpan-path:         TODDR/YAML-Syck-1.21_01.tar.gz
gitpan-cpan-author:       TODDR
gitpan-cpan-maturity:     developer
  • Loading branch information
toddr authored and Gitpan committed Oct 21, 2014
1 parent fe9f663 commit 7609d91
Show file tree
Hide file tree
Showing 24 changed files with 839 additions and 88 deletions.
14 changes: 12 additions & 2 deletions Changes
@@ -1,8 +1,18 @@
[Changes for 1.20] (JSON::Syck 0.43) - 2012-02-14]
[Changes for 1.21_01 - 2012-06-22]

* Synchronize JSON::Syck with YAML::Syck version number
* Add DumpInto functions (YAML+Syck) which dump into
a provided scalar instead of a newly allocated one
* Modify DumpFile functions to output directly to the
specified file/filehandle instead of buffering all
output in memory.
* Avoid modifying numbers into strings when emitting

[Changes for 1.20 (JSON::Syck 0.43) - 2012-02-14]

* Tests all green on CPAN Testers. releasing to public.

[Changes for 1.20_01] (JSON::Syck 0.43_01) - 2012-02-11]
[Changes for 1.20_01 (JSON::Syck 0.43_01) - 2012-02-11]

* Add test to assure META.yml is up to date before release
* Fix for RT 70933 - disable check for empty file handle in LoadFile calls
Expand Down
6 changes: 5 additions & 1 deletion MANIFEST
Expand Up @@ -20,6 +20,7 @@ inc/Module/Install/WriteAll.pm
inc/parent.pm
inc/PerlIO.pm
inc/Test/Builder.pm
inc/Test/Builder/IO/Scalar.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
lib/JSON/Syck.pm
Expand Down Expand Up @@ -47,11 +48,13 @@ t/12-dumpfile.t
t/2-scalars.t
t/3-objects.t
t/4-perl_tag_scheme.t
t/bug/doesnt-stringify.t
t/bug/rt-49404-double_free.t
t/bug/rt-54167.t
t/json-basic.t
t/json-circular-ref.t
t/json-crlf.t
t/json-dumpinto.t
t/json-empty.t
t/json-indent.t
t/json-loadfile.t
Expand All @@ -62,11 +65,12 @@ t/json-numbers.t
t/json-refs.t
t/json-singlequote.t
t/leak.t
t/meta.t
t/TestYAML.pm
t/yaml-alias.t
t/yaml-blessed-ref.t
t/yaml-dumpinto.t
t/yaml-implicit-warnings.t
t/yaml-str-colon-first.t
t/yaml-tie.t
t/meta.t
token.c
8 changes: 4 additions & 4 deletions META.yml
Expand Up @@ -3,12 +3,12 @@ abstract: 'Fast, lightweight YAML loader and dumper'
author:
- 'Audrey Tang <cpan@audreyt.org>'
build_requires:
ExtUtils::MakeMaker: 6.62
ExtUtils::MakeMaker: 6.59
configure_requires:
ExtUtils::MakeMaker: 6.62
ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
generated_by: 'Module::Install version 1.04'
generated_by: 'Module::Install version 1.06'
license: mit
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
Expand All @@ -25,4 +25,4 @@ resources:
homepage: http://search.cpan.org/dist/YAML-Syck
license: http://opensource.org/licenses/mit-license.php
repository: http://github.com/avar/YAML-Syck
version: 1.20
version: 1.21_01
22 changes: 22 additions & 0 deletions Syck.xs
Expand Up @@ -7,6 +7,8 @@
#undef YAML_IS_JSON
#include "perl_syck.h"

typedef PerlIO * OutputStream;

MODULE = YAML::Syck PACKAGE = YAML::Syck

PROTOTYPES: DISABLE
Expand All @@ -19,6 +21,16 @@ SV *
DumpYAML (sv)
SV * sv

int
DumpYAMLInto (in, out)
SV * in
SV * out

int
DumpYAMLFile (in, out)
SV * in
OutputStream out


SV *
LoadJSON (s)
Expand All @@ -28,3 +40,13 @@ SV *
DumpJSON (sv)
SV * sv

int
DumpJSONInto (in, out)
SV * in
SV * out

int
DumpJSONFile (in, out)
SV * in
OutputStream out

4 changes: 2 additions & 2 deletions inc/Module/Install.pm
Expand Up @@ -31,7 +31,7 @@ BEGIN {
# 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.04';
$VERSION = '1.06';

# Storage for the pseudo-singleton
$MAIN = undef;
Expand Down Expand Up @@ -467,4 +467,4 @@ sub _CLASS ($) {

1;

# Copyright 2008 - 2011 Adam Kennedy.
# Copyright 2008 - 2012 Adam Kennedy.
2 changes: 1 addition & 1 deletion inc/Module/Install/Base.pm
Expand Up @@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
}

# Suspend handler for "redefined" warnings
Expand Down
85 changes: 79 additions & 6 deletions inc/Module/Install/Can.pm
Expand Up @@ -3,13 +3,12 @@ package Module::Install::Can;

use strict;
use Config ();
use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand All @@ -29,7 +28,7 @@ sub can_use {
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) = @_;

Expand All @@ -38,14 +37,88 @@ sub can_run {

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;
Expand Down Expand Up @@ -78,4 +151,4 @@ if ( $^O eq 'cygwin' ) {

__END__
#line 156
#line 236
2 changes: 1 addition & 1 deletion inc/Module/Install/Compiler.pm
Expand Up @@ -7,7 +7,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/Module/Install/Fetch.pm
Expand Up @@ -6,7 +6,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/Module/Install/Include.pm
Expand Up @@ -6,7 +6,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down
22 changes: 13 additions & 9 deletions inc/Module/Install/Makefile.pm
Expand Up @@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down Expand Up @@ -215,13 +215,17 @@ sub write {
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.
Expand Down Expand Up @@ -411,4 +415,4 @@ sub postamble {

__END__
#line 540
#line 544
2 changes: 1 addition & 1 deletion inc/Module/Install/Metadata.pm
Expand Up @@ -6,7 +6,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/Module/Install/Win32.pm
Expand Up @@ -6,7 +6,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/Module/Install/WriteAll.pm
Expand Up @@ -6,7 +6,7 @@ use Module::Install::Base ();

use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.04';
$VERSION = '1.06';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Expand Down
4 changes: 2 additions & 2 deletions inc/PerlIO.pm
@@ -1,7 +1,7 @@
#line 1
package PerlIO;

our $VERSION = '1.07';
our $VERSION = '1.06';

# Map layer name to package that defines it
our %alias;
Expand Down Expand Up @@ -30,4 +30,4 @@ sub F_UTF8 () { 0x8000 }
1;
__END__
#line 332
#line 344

0 comments on commit 7609d91

Please sign in to comment.