Data objects assist cleaning of string.
To use String::Clean, simply initialize it using the new() method. Then, use the replace() method to replace instances of certain values within your string. For example, replace 'this' and 'is' with 'that' and 'was', respectively. The result would be 'that was a test'.
The module also comes with an options hash, which allows you to customize String::Clean's behavior according to your preference. The hash can be passed to the new() method as well as to each function call as need be. You can use this hash to set regex options or to specify whether to replace or strip whole words or just character collections.
Moreover, you can change the word boundary by using the word_boundary hook, which comes in handy while dealing with strings containing commas and such. If you want to turn off the escaping of values that String::Clean is looking for, you can do so by setting the escape option to 'no'.
You can even override options at the function level. For this, you need to pass a merged hash to the function, containing options that you want to use.
Overall, String::Clean is a useful tool for those who need to process and clean up strings on a regular basis, and its flexibility makes it a popular choice for those who want to customize their cleaning process as they see fit.
Version 0.022: N/A