add type with coersion for WebGUI::Config
This commit is contained in:
parent
19c2c5fa1c
commit
8bfa022441
4 changed files with 16 additions and 12 deletions
|
|
@ -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'
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue