is_lax#
Test whether a string is acceptable to parse / new as a version.
תקציר#
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.
מה מוחזר#
A boolean: 1 if the string parses as any valid version, the empty string otherwise.
דוגמאות#
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"); # ""
הבדלים מן ה-upstream#
Fully compatible with upstream version 0.9929.
ראו גם#
is_strict- the tighter validator, used for CPAN-indexable versionsnew- accepts the same set of strings