Pull types into its own file.

This commit is contained in:
Colin Kuskie 2010-03-18 14:46:13 -07:00
parent a92a50046e
commit b41338cef5

View file

@ -20,15 +20,7 @@ use JSON;
use HTML::Packer;
use Moose;
use Moose::Util::TypeConstraints;
subtype 'WebGUI::Type::JSONArray'
=> as 'ArrayRef'
;
coerce 'WebGUI::Type::JSONArray'
=> from Str
=> via { my $struct = eval { JSON::from_json($_); }; $struct ||= []; return $struct },
;
use WebGUI::Types;
use WebGUI::Definition::Asset;
define assetName => ['asset', 'Asset'];