From: Jan Henning Thorsen Date: Thu, 12 Aug 2010 17:03:22 +0000 (+0200) Subject: re-arranged types in a logical matter X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5bea5fc4bb5304267aca3f4ee95e2ff4b06735cb;p=dbsrgits%2FDBIx-Class.git re-arranged types in a logical matter --- diff --git a/lib/DBIx/Class/Admin/Types.pm b/lib/DBIx/Class/Admin/Types.pm index 23af292..cc2f20e 100644 --- a/lib/DBIx/Class/Admin/Types.pm +++ b/lib/DBIx/Class/Admin/Types.pm @@ -12,13 +12,13 @@ use MooseX::Types::JSON qw(JSON); subtype DBICArrayRef, as ArrayRef; -subtype DBICHashRef, - as HashRef; - coerce DBICArrayRef, from JSON, via { _json_to_data ($_) }; +subtype DBICHashRef, + as HashRef; + coerce DBICHashRef, from JSON, via { _json_to_data($_) }; @@ -28,15 +28,12 @@ subtype DBICConnectInfo, coerce DBICConnectInfo, from JSON, - via { return _json_to_data($_) } ; - -coerce DBICConnectInfo, + via { return _json_to_data($_) }, from Str, - via { return _json_to_data($_) }; - -coerce DBICConnectInfo, + via { return _json_to_data($_) }, from HashRef, - via { [ $_ ] }; + via { [ $_ ] } + ; sub _json_to_data { my ($json_str) = @_;