Acme-Perl-Consensual

 view release on metacpan or  search on metacpan

inc/Module/Install/TrustMetaYml.pm  view on Meta::CPAN

39
40
41
42
43
44
45
46
47
48
49
         
        return $self;
}
 
*trust_meta_yaml = \&trust_meta_yml;
 
1;
 
__END__
 
=encoding utf8

inc/YAML/Tiny.pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#line 1
package YAML::Tiny;
 
use strict;
 
# 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;
        require Exporter;
        require Carp;
        $YAML::Tiny::VERSION   = '1.51';
        # $YAML::Tiny::VERSION   = eval $YAML::Tiny::VERSION;
        @YAML::Tiny::ISA       = qw{ Exporter  };

inc/YAML/Tiny.pm  view on Meta::CPAN

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#     "\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)/ ) {
        die \"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/ ) {
        die \"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.059 second using v1.01-cache-2.11-cpan-49f99fa48dc )