summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-02-08 09:51:30 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-02-08 12:28:33 +0000
commita4a5e2bf376c447a0f259a4a8033781dfc6c46fa (patch)
tree2c60b16bfc333144cfcb3ffa3ee8da82597b24b3 /cpan
parentce09a8a1b524f8cb4818cc8d1da635553aefdafd (diff)
downloadperl-a4a5e2bf376c447a0f259a4a8033781dfc6c46fa.tar.gz
Update Parse-CPAN-Meta to CPAN version 1.4402
[DELTA] 1.4402 Tue Feb 07 2012 - Minor maintenance: standardized newlines to Unix style
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Parse-CPAN-Meta/Changes3
-rw-r--r--cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm22
2 files changed, 14 insertions, 11 deletions
diff --git a/cpan/Parse-CPAN-Meta/Changes b/cpan/Parse-CPAN-Meta/Changes
index 68ac154b1b..d9e3df948c 100644
--- a/cpan/Parse-CPAN-Meta/Changes
+++ b/cpan/Parse-CPAN-Meta/Changes
@@ -1,5 +1,8 @@
Changes for Perl programming language extension Parse-CPAN-Meta
+1.4402 Tue Feb 07 2012
+ - Minor maintenance: standardized newlines to Unix style
+
1.4401 Fri Feb 04 2011
- Removed Module::Load::Conditional dependency
diff --git a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
index f7d717cdb1..04ac3e16a1 100644
--- a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
+++ b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
@@ -5,7 +5,7 @@ use Carp 'croak';
# UTF Support?
sub HAVE_UTF8 () { $] >= 5.007003 }
-sub IO_LAYER () { $] >= 5.008001 ? ":utf8" : "" }
+sub IO_LAYER () { $] >= 5.008001 ? ":utf8" : "" }
BEGIN {
if ( HAVE_UTF8 ) {
@@ -17,7 +17,7 @@ BEGIN {
# Class structure
require 5.004;
require Exporter;
- $Parse::CPAN::Meta::VERSION = '1.4401';
+ $Parse::CPAN::Meta::VERSION = '1.4402';
@Parse::CPAN::Meta::ISA = qw{ Exporter };
@Parse::CPAN::Meta::EXPORT_OK = qw{ Load LoadFile };
}
@@ -40,7 +40,7 @@ sub load_yaml_string {
my ($class, $string) = @_;
my $backend = $class->yaml_backend();
my $data = eval { no strict 'refs'; &{"$backend\::Load"}($string) };
- if ( $@ ) {
+ if ( $@ ) {
croak $backend->can('errstr') ? $backend->errstr : $@
}
return $data || {}; # in case document was valid but empty
@@ -88,7 +88,7 @@ sub _slurp {
or die "can't open $_[0] for reading: $!";
return do { local $/; <$fh> };
}
-
+
sub _can_load {
my ($module, $version) = @_;
(my $file = $module) =~ s{::}{/}g;
@@ -133,21 +133,21 @@ Parse::CPAN::Meta - Parse META.yml and META.json CPAN metadata files
#############################################
# In your file
-
+
---
name: My-Distribution
version: 1.23
resources:
homepage: "http://example.com/dist/My-Distribution"
-
-
+
+
#############################################
# In your program
-
+
use Parse::CPAN::Meta;
-
+
my $distmeta = Parse::CPAN::Meta->load_file('META.yml');
-
+
# Reading properties
my $name = $distmeta->{name};
my $version = $distmeta->{version};
@@ -196,7 +196,7 @@ C<load_yaml_string>.
my $metadata_structure = Parse::CPAN::Meta->load_json_string($json_string);
-This method deserializes the given string of JSON and the result.
+This method deserializes the given string of JSON and the result.
If the source was UTF-8 encoded, the string must be decoded before calling
C<load_json_string>.