is_lax#
Test whether a string is acceptable to parse / new as a version.
Synopsis#
version::is_lax($str);
version->is_lax($str);
Accepts anything the constructor would accept: decimal, dotted-integer,
v-string, with or without an underscore for alpha. Use it to validate
user input before feeding it to parse.
What you get back#
A boolean: 1 if the string parses as any valid version, the empty
string otherwise.
Examples#
version::is_lax("1.0203"); # 1
version::is_lax("v1.2.3"); # 1
version::is_lax("1.02_03"); # 1
version::is_lax(""); # ""
version::is_lax("abc"); # ""
Differences from upstream#
Fully compatible with upstream version 0.9929.
See also#
is_strict— the tighter validator, used for CPAN-indexable versionsnew— accepts the same set of strings