X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FUtil.pm;h=01d72e0938f5aaa517a863081815c0ca1f3ce9a8;hb=160645455e5d1f9a19170bf4b7fce94ff839f42d;hp=2f600f3cd35ddeef70c4e5f04c778fbaa201c7b0;hpb=004bf3ea04d7818116a94bb4b387d8ae1dd10f9a;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Util.pm b/lib/MooseX/Storage/Util.pm index 2f600f3..01d72e0 100644 --- a/lib/MooseX/Storage/Util.pm +++ b/lib/MooseX/Storage/Util.pm @@ -2,10 +2,6 @@ package MooseX::Storage::Util; use Moose qw(confess blessed); use MooseX::Storage::Engine (); -use utf8 (); - -our $VERSION = '0.28'; -our $AUTHORITY = 'cpan:STEVAN'; sub peek { my ($class, $data, %options) = @_; @@ -30,7 +26,7 @@ sub peek { } sub _inflate_json { - my ($class, $json) = @_; + my ($self, $json) = @_; eval { require JSON::Any; JSON::Any->import }; confess "Could not load JSON module because : $@" if $@; @@ -46,18 +42,12 @@ sub _inflate_json { } sub _inflate_yaml { - my ($class, $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 : $@"; } @@ -74,7 +64,7 @@ __END__ =head1 NAME -MooseX::Storage::Util - A MooseX::Storage swiss-army chainsaw +MooseX::Storage::Util - A MooseX::Storage Swiss Army chainsaw =head1 DESCRIPTION @@ -127,6 +117,8 @@ found in the key for you. =back +=for stopwords TODO + =head1 TODO Add more stuff to this module :)