Data::Type::Filter - cleans values before normally subjecting to facets
package Data::Type::Object::std_langcode; ... sub _filters : method { return ( [ 'strip', '\s' ], [ 'chomp' ], [ 'lc' ] ) }
package Data::Type::Filter::chomp; our @ISA = ( 'Data::Type::Filter::Interface' ); our $VERSION = '0.01.25'; sub desc : method { 'chomps' } sub info : method { 'chomps' } sub filter : method { my $this = shift; chomp $Data::Type::value; }
Chomps (as perl chomp()).
chomp()
Lower cases (as perl lc()).
lc()
Upper cases (as perl uc()).
uc()
A simple s/what// operation as
$Data::Type::value =~ s/$what//go;
Collapses any arbitrary repeats of what to a single.
Sourceforge http://sf.net/projects/datatype is hosting a project dedicated to this module. And I enjoy receiving your comments/suggestion/reports also via http://rt.cpan.org or http://testers.cpan.org.
Murat Uenalan, <muenalan@cpan.org>
To install Data::Type, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Type
CPAN shell
perl -MCPAN -e shell install Data::Type
For more information on module installation, please visit the detailed CPAN module installation guide.