Alien-V8

 view release on metacpan or  search on metacpan

inc/inc_Module-Build/Module/Build/PPMMaker.pm  view on Meta::CPAN

  $ppd .= <<'EOF';
    </IMPLEMENTATION>
</SOFTPKG>
EOF

  my $ppd_file = "$dist{name}.ppd";
  my $fh = IO::File->new(">$ppd_file")
    or die "Cannot write to $ppd_file: $!";

  my $io_file_ok = eval { IO::File->VERSION(1.13); 1 };
  $fh->binmode(":utf8")
    if $io_file_ok && $fh->can('binmode') && $] >= 5.008 && $Config{useperlio};
  print $fh $ppd;
  close $fh;

  return $ppd_file;
}

sub _ppd_version {
  my ($self, $version) = @_;

inc/inc_Module-Build/Module/Build/YAML.pm  view on Meta::CPAN

package Module::Build::YAML;

use strict;
use Carp 'croak';

# UTF Support?
sub HAVE_UTF8 () { $] >= 5.007003 }
BEGIN {
	if ( HAVE_UTF8 ) {
		# The string eval helps hide this from Test::MinimumVersion
		eval "require utf8;";
		die "Failed to load UTF-8 support" if $@;
	}

	# Class structure
	require 5.004;

	$Module::Build::YAML::VERSION   = '1.40';

	# Error storage
	$Module::Build::YAML::errstr    = '';

inc/inc_Module-Build/Module/Build/YAML.pm  view on Meta::CPAN

	#     "\377\376\0\0" => 'UTF-32LE'
	#     "\0\0\376\377" => 'UTF-32BE',
	# );
	if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
		return $self->_error("Stream has a non UTF-8 BOM");
	} else {
		# Strip UTF-8 bom if found, we'll just ignore it
		$string =~ s/^\357\273\277//;
	}

	# Try to decode as utf8
	utf8::decode($string) if HAVE_UTF8;

	# Check for some special cases
	return $self unless length $string;
	unless ( $string =~ /[\012\015]+\z/ ) {
		return $self->_error("Stream does not end with newline character");
	}

	# Split the file into lines
	my @lines = grep { ! /^\s*(?:\#.*)?\z/ }
	            split /(?:\015{1,2}\012|\015|\012)/, $string;



( run in 1.129 second using v1.01-cache-2.11-cpan-49f99fa48dc )