dagolden/cpan-meta — pull request #9 by charsbar (2013-05-29 05:30:10+00:00)
Title: remove x_ from custom resources while downgrading

The following script demonstrates this issue. Without this fix you'll see an error like this: `Resource 'x_MailingList' must be in CamelCase. (resources -> x_MailingList)`. See also ExtUtils::MakeMaker (https://metacpan.org/source/BINGOS/ExtUtils-MakeMaker-6.66/META.yml) and its Makefile.PL (https://metacpan.org/source/BINGOS/ExtUtils-MakeMaker-6.66/Makefile.PL) for a live example.

```perl
use strict;
use warnings;
use CPAN::Meta;
use File::Temp;
use Test::More;
use Test::CPAN::Meta;

my $yaml = <<'YAML';
---
author:
- A.U.Thor
abstract: shows an issue on downgrading resources
generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112621'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Resource-Conversion-Test
resources:
MailingList: some@mailing.list
version: 0.01
YAML

my $meta = CPAN::Meta->load_yaml_string($yaml);
my $tmpdir = File::Temp->newdir(CLEANUP => 1);
my $tmpfile = "$tmpdir/META.yml";
open my $fh, '>', $tmpfile or die $!;
print $fh $meta->as_string({version => '1.4'});
close $fh;

meta_spec_ok($tmpfile, 1.4);
done_testing;
```