or download this
# in package MyModule::Types
declare DBPrefix, as Optional[StrMatch[ qr/ \w+_ /x ]],
...
# "Optional[StrMatch[(?^x: \w+_ )]]" constrains $_[0] with "StrMatc
+h[(?^x: \w+_ )]" if it exists
# Value "bar" did not pass type constraint "StrMatch[(?^x: \w+_ )]"
+ (in $_[0])
# "StrMatch[(?^x: \w+_ )]" is defined as: do { !ref($_) and $_ =~ $
+Types::Standard::_StrMatch{"(?^x: \\w+_ )"} }