From: Stevan Little Date: Tue, 6 May 2008 23:30:52 +0000 (+0000) Subject: some small tweaks X-Git-Tag: 0.14~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3defafb9b4522e7d8f94a52ad939b0a5d8dc7bd9;hp=f33d3998fbcd3f8442814901b95f945b5afdedfb;p=gitmo%2FMooseX-Storage.git some small tweaks --- diff --git a/Changes b/Changes index c10b400..9948491 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Revision history for MooseX-Storage +0.13 + * MooseX::Storage::Engine + - added find_type_handler_for($name) method + to make finding type handlers easier + - improved error messages + 0.12 Fri. March 14, 2008 - added build_requires for Test::Deep (awwaiid) diff --git a/README b/README index 0fe223c..c6882a1 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -MooseX-Storage version 0.12 +MooseX-Storage version 0.13 INSTALLATION diff --git a/lib/MooseX/Storage.pm b/lib/MooseX/Storage.pm index 05962d6..dd84806 100644 --- a/lib/MooseX/Storage.pm +++ b/lib/MooseX/Storage.pm @@ -4,7 +4,7 @@ use Moose qw(confess); use MooseX::Storage::Meta::Attribute::DoNotSerialize; -our $VERSION = '0.12'; +our $VERSION = '0.13'; our $AUTHORITY = 'cpan:STEVAN'; sub import { diff --git a/lib/MooseX/Storage/Engine.pm b/lib/MooseX/Storage/Engine.pm index 999dbb9..f4867c4 100644 --- a/lib/MooseX/Storage/Engine.pm +++ b/lib/MooseX/Storage/Engine.pm @@ -2,7 +2,7 @@ package MooseX::Storage::Engine; use Moose; -our $VERSION = '0.05'; +our $VERSION = '0.06'; our $AUTHORITY = 'cpan:STEVAN'; # the class marker when @@ -196,7 +196,7 @@ my %OBJECT_HANDLERS = ( # ($obj->can('does') && $obj->does('MooseX::Storage::Basic')) # || confess "Bad object ($obj) does not do MooseX::Storage::Basic role"; ($obj->can('pack')) - || confess "Object does not have a &pack method, cannot collapse"; + || confess "Object ($obj) does not have a &pack method, cannot collapse"; $obj->pack(%$options); }, ); @@ -332,6 +332,11 @@ sub find_type_handler { confess "Cannot handle type constraint (" . $type_constraint->name . ")"; } +sub find_type_handler_for { + my ($self, $type_handler_name) = @_; + $TYPES{$type_handler_name} +} + 1; __END__ @@ -396,11 +401,13 @@ No user serviceable parts inside. If you really want to know, read the source :) =over 4 -=item B +=item B + +=item B -=item B +=item B -=item B +=item B =back