add type with coersion for WebGUI::Config

This commit is contained in:
Graham Knop 2010-06-17 05:54:36 -05:00
parent 19c2c5fa1c
commit 8bfa022441
4 changed files with 16 additions and 12 deletions

View file

@ -45,6 +45,17 @@ Similarly, if an undef value is applied, it is coerced into an empty arrayref.
=cut
subtype 'WebGUI::Type::Config'
=> as class_type('WebGUI::Config');
coerce 'WebGUI::Type::Config'
=> from Str
=> via {
require WebGUI::Config;
WebGUI::Config->new($_)
}
;
subtype 'WebGUI::Type::JSONArray'
=> as 'ArrayRef'
;