From: Karen Etheridge Date: Fri, 9 Aug 2013 18:11:25 +0000 (-0700) Subject: remove last use of Best (that should have come out in 2010!) X-Git-Tag: v0.40~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=160645455e5d1f9a19170bf4b7fce94ff839f42d;p=gitmo%2FMooseX-Storage.git remove last use of Best (that should have come out in 2010!) --- diff --git a/Changes b/Changes index 4ee20fb..ec0528b 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for {{$dist->name}} {{$NEXT}} + * replaced last use of Best (held over since 2010!) to YAML::Any 0.39 2013-07-26 17:02:26 PDT-0700 (Karen Etheridge) * re-release as stable (full working Dist::Zilla conversion) diff --git a/lib/MooseX/Storage/Util.pm b/lib/MooseX/Storage/Util.pm index 91ad692..01d72e0 100644 --- a/lib/MooseX/Storage/Util.pm +++ b/lib/MooseX/Storage/Util.pm @@ -44,16 +44,10 @@ sub _inflate_json { sub _inflate_yaml { my ($self, $yaml) = @_; - require Best; - eval { Best->import([[ qw[YAML::Syck YAML] ]]) }; + eval { require YAML::Any; YAML::Any->import }; confess "Could not load YAML module because : $@" if $@; - my $inflater = Best->which('YAML::Syck')->can('Load'); - - (defined $inflater) - || confess "Could not load the YAML inflator"; - - my $data = eval { $inflater->($yaml) }; + my $data = eval { Load($yaml) }; if ($@) { confess "There was an error when attempting to peek at YAML : $@"; } diff --git a/t/040_basic_utils.t b/t/040_basic_utils.t index a969836..4d3f803 100644 --- a/t/040_basic_utils.t +++ b/t/040_basic_utils.t @@ -74,9 +74,7 @@ SKIP: { my $classname = eval { MooseX::Storage::Util->peek($yaml => ('format' => 'YAML')) }; - if ($@ =~ /^Could not load YAML module because/ - or $@ =~ /^Can't locate Best/ - ) { + if ($@ =~ /^Could not load YAML module because/) { die 'No YAML module found' if $ENV{AUTHOR_TESTING}; skip "No YAML module found", 1; }