[Bast-commits] r8392 - in
DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class: . Admin
goraxe at dev.catalyst.perl.org
goraxe at dev.catalyst.perl.org
Wed Jan 20 20:13:25 GMT 2010
Author: goraxe
Date: 2010-01-20 20:13:24 +0000 (Wed, 20 Jan 2010)
New Revision: 8392
Modified:
DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm
DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin/Types.pm
Log:
add private types to coerce
Modified: DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin/Types.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin/Types.pm 2010-01-20 19:54:29 UTC (rev 8391)
+++ DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin/Types.pm 2010-01-20 20:13:24 UTC (rev 8392)
@@ -3,15 +3,23 @@
use MooseX::Types -declare => [qw(
DBICConnectInfo
+ DBICArrayRef
+ DBICHashRef
)];
use MooseX::Types::Moose qw/Int HashRef ArrayRef Str Any Bool/;
use MooseX::Types::JSON qw(JSON);
-coerce ArrayRef,
+subtype DBICArrayRef,
+ as ArrayRef;
+
+subtype DBICHashRef,
+ as HashRef;
+
+coerce DBICArrayRef,
from JSON,
via { _json_to_data ($_) };
-coerce HashRef,
+coerce DBICHashRef,
from JSON,
via { _json_to_data($_) };
Modified: DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm 2010-01-20 19:54:29 UTC (rev 8391)
+++ DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm 2010-01-20 20:13:24 UTC (rev 8392)
@@ -25,8 +25,8 @@
use parent 'DBIx::Class::Schema';
use Carp::Clan qw/^DBIx::Class/;
-use MooseX::Types::Moose qw/Int HashRef ArrayRef Str Any Bool/;
-use DBIx::Class::Admin::Types qw/DBICConnectInfo/;
+use MooseX::Types::Moose qw/Int Str Any Bool/;
+use DBIx::Class::Admin::Types qw/DBICConnectInfo DBICHashRef/;
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use Try::Tiny;
@@ -117,7 +117,7 @@
has 'where' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
@@ -130,7 +130,7 @@
has 'set' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
@@ -143,7 +143,7 @@
has 'attrs' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
@@ -204,7 +204,7 @@
has config => (
is => 'ro',
- isa => HashRef,
+ isa => DBICHashRef,
lazy_build => 1,
);
More information about the Bast-commits
mailing list