CPANPLUS
view release on metacpan or search on metacpan
inc/bundle/CPAN/Meta/YAML.pm view on Meta::CPAN
if ( utf8::is_utf8($string) && ! utf8::valid($string) ) {
die \<<'...';
Read an invalid UTF-8 string (maybe mixed UTF-8 and 8-bit character set).
Did you decode with lax ":utf8" instead of strict ":encoding(UTF-8)"?
...
}
# Ensure Unicode character semantics, even for 0x80-0xff
utf8::upgrade($string);
# Check for and strip any leading UTF-8 BOM
$string =~ s/^\x{FEFF}//;
# Check for some special cases
return $self unless length $string;
# Split the file into lines
my @lines = grep { ! /^\s*(?:\#.*)?\z/ }
split /(?:\015{1,2}\012|\015|\012)/, $string;
# Strip the initial YAML header
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'IO::Uncompress::RawInflate'=> '2.068_001',
'IO::Uncompress::Unzip' => '2.068_001',
'IPC::Cmd' => '0.92_01',
'JSON::PP' => '2.27300_01',
'Locale::Maketext' => '1.26_01',
'Locale::Maketext::Simple'=> '0.21_01',
'Memoize' => '1.03_01',
'Module::CoreList' => '5.20170114_22',
'Module::CoreList::TieHashDelta'=> '5.20170114_22',
'Module::CoreList::Utils'=> '5.20170114_22',
'Module::Metadata::corpus::BOMTest::UTF16BE'=> undef,
'Module::Metadata::corpus::BOMTest::UTF16LE'=> undef,
'Module::Metadata::corpus::BOMTest::UTF8'=> '1',
'Net::Cmd' => '3.05_01',
'Net::Config' => '3.05_01',
'Net::Domain' => '3.05_01',
'Net::FTP' => '3.05_01',
'Net::FTP::A' => '3.05_01',
'Net::FTP::E' => '3.05_01',
'Net::FTP::I' => '3.05_01',
'Net::FTP::L' => '3.05_01',
'Net::FTP::dataconn' => '3.05_01',
'Net::NNTP' => '3.05_01',
inc/bundle/Module/CoreList.pm view on Meta::CPAN
'IPC::Cmd' => '0.92_01',
'JSON::PP' => '2.27300_01',
'Locale::Maketext' => '1.26_01',
'Locale::Maketext::Simple'=> '0.21_01',
'Math::BigFloat::Trace' => '0.42_01',
'Math::BigInt::Trace' => '0.42_01',
'Memoize' => '1.03_01',
'Module::CoreList' => '5.20170114_24',
'Module::CoreList::TieHashDelta'=> '5.20170114_24',
'Module::CoreList::Utils'=> '5.20170114_24',
'Module::Metadata::corpus::BOMTest::UTF16BE'=> undef,
'Module::Metadata::corpus::BOMTest::UTF16LE'=> undef,
'Module::Metadata::corpus::BOMTest::UTF8'=> '1',
'Net::Cmd' => '3.08_01',
'Net::Config' => '3.08_01',
'Net::Domain' => '3.08_01',
'Net::FTP' => '3.08_01',
'Net::FTP::A' => '3.08_01',
'Net::FTP::E' => '3.08_01',
'Net::FTP::I' => '3.08_01',
'Net::FTP::L' => '3.08_01',
'Net::FTP::dataconn' => '3.08_01',
'Net::NNTP' => '3.08_01',
inc/bundle/Module/Metadata.pm view on Meta::CPAN
( $sigil, $variable_name, $package) = $2 ? ( $1, $2, $3 ) : ( $4, $5, $6 );
if ( $package ) {
$package = ($package eq '::') ? 'main' : $package;
$package =~ s/::$//;
}
}
return ( $sigil, $variable_name, $package );
}
# Look for a UTF-8/UTF-16BE/UTF-16LE BOM at the beginning of the stream.
# If there's one, then skip it and set the :encoding layer appropriately.
sub _handle_bom {
my ($self, $fh, $filename) = @_;
my $pos = tell $fh;
return unless defined $pos;
my $buf = ' ' x 2;
my $count = read $fh, $buf, length $buf;
return unless defined $count and $count >= 2;
( run in 0.433 second using v1.01-cache-2.11-cpan-f29a10751f0 )