sub like
1 | module Test |
1.1 | (Test) sub like |
Documentation for sub like
assembled from the following types:
module Test
From Test
(Test) sub like
Defined as:
sub like(Str() , Regex , = "text matches $expected.perl()")
Use it this way:
like 'foo', /fo/, 'foo looks like fo';
Marks a test as passed if the $value
, when coerced to a string, matches the $expected-regex
. The function accepts an optional description of the test with a default value printing the expected match.