Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

Badger::Data::Facet::Text::Whitespace - validation facet for whitespace

Author

       Andy Wardley <http://wardley.org/>

Description

       This module implements a validation facets for munging whitespace on text values.

Methods

       This module implement the following methods in addition to those inherited from the
       Badger::Data::Facet::Text, Badger::Data::Facet and Badger::Base base classes.

   validate($text_ref,$type)
       This method performs whitespace handling on the text passed by reference as the first argument.

       If the pre-defined "action" is "preserve" then the text will be unmodified.

       If the "action" is "fold" then all whitespace characters in the text (carriage returns, newlines, tabs)
       will be converted to spaces.

       If the "action" is "collapse" then all whitespace characters will first be converted to spaces as per
       "fold".  Any leading and trailing whitespace is then removed and any sequences of multiple spaces are
       collapsed to a single space.

Name

       Badger::Data::Facet::Text::Whitespace - validation facet for whitespace

See Also

       Badger::Base, Badger::Data::Facet, Badger::Data::Facet::Text.

perl v5.36.0                                       2023-08-28              Badger::Data::...ext::Whitespace(3pm)

See Also