From b41338cef5802632345e8063d0ded4f416ca8a30 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 18 Mar 2010 14:46:13 -0700 Subject: [PATCH] Pull types into its own file. --- lib/WebGUI/Asset.pm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index dfec52ab9..b34f244b3 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -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'];